M
'Mani
Hi,
This is just a generic question, where i want to know what is the
difference in including a header file in a .h file and .cpp file.
I have a class called MyClass (MyClass.h & MyClass.cpp).
There is another class (OtherClass.h & OtherClass.cpp)
OtherClass.cpp has a forward declaration to a class called 'Calc' which
is in the namespace called 'Utils' like below:
Class Utils::Calc;
Now, i included the OtherClass.h file in my MyClass.h file and tried to
compile. I got the error:
something like: ' Calc is not a member of the namespace 'Utils'.
But including the OtherClass.h in MyClass.cpp file compiles fine.
Any Idea?
This is just a generic question, where i want to know what is the
difference in including a header file in a .h file and .cpp file.
I have a class called MyClass (MyClass.h & MyClass.cpp).
There is another class (OtherClass.h & OtherClass.cpp)
OtherClass.cpp has a forward declaration to a class called 'Calc' which
is in the namespace called 'Utils' like below:
Class Utils::Calc;
Now, i included the OtherClass.h file in my MyClass.h file and tried to
compile. I got the error:
something like: ' Calc is not a member of the namespace 'Utils'.
But including the OtherClass.h in MyClass.cpp file compiles fine.
Any Idea?