Simple problem, I''m sure some of you have hurt your head against the wall (like I did) and lose some coffeine on this...
I have a beautiful class A, which has a pointer to class B. Class B, in return, does too have a pointer to a class B.
Now what? The simplest problem of all earth: declaration of both class.
I cannot do the following (if some of you thought of this..
![](wink.gif)
):
class A
{
protected: B* Toto;
}
class B
{
protected: A* Toto;
}
|
Because the compiler will hurry to tell you that class B doesn''t exists when it comes to class A.
Then I need help. I just tried thingies like declaring a
before the declaration of class A, but it didn''t seem to work...
I''m waiting (desparately) for an answer...
Thanks