problems with forward declaration
Thanks in advance for looking over this.
I'm having serious problems with vc++6.
I have 3 vector classes, CVector2, CVector3, and CVector4. each of them reference both others. before any of them are declared I use
Code:
class CVector2;
class CVector3;
class CVector4;
then I define the functions in CVector2, CVector3, and CVector4 in that order.
Everytime I make reference CVector3 or CVector4 in the code for CVector2 it gives me the following (or similar) error:
error C2027: use of undefined type 'CVector3'
vector.h(33) : see declaration of 'CVector3'
How could the type be undefined if the compiler knows it has been declared? I'm utterly confused...