completely stuck with events

hey all

i posted something previously in the advanced forums (my lack of ability to sort this out demotes me back to beginner :frowning:

you have a problem of recursive inclusion. to solve it you need to do something called a forward declaration: lets say that you have A and B, and both need to know each other:

  
  
A.h:  
  
class B;  
class A{  
...  
  
B*b;  
}  
  
A.cpp:  
#include "B.h"  
  
  
B.h:  
#include "A.h"  
  
class B{  
  
A * a;  
}  

so the idea is that you cannot include a file that is including itself. to avoid it you declare the other class in one of the .h and include the file in the cpp.

so what you’re saying is that if i have like:

A.cpp
A.h

B.cpp
B.h

A.cpp includes A.h
A.h includes B.h

B.cpp includes A.h
then that’s ok?

and i can have my instance of A in B and B in A?

will give it a test when i get to my laptop to see if i understand properly. thanks so much!