I have two classes like this:
class B; class A { public: int a, b; B *b; public: int getctxt() { b->getctxt1(); } } Class B { public: int c,d; A *a; getctxt1() { /* something */ } } main() { B *b = new B(); A *a = new A(); b->a = a; a->b = b; } But when I try to compile, it says
invalid use of incomplete type ‘struct A’.
Can anyone tell me how to solve this?
;at the end of each class declaration? ;-)