Hello,

I have two classes, Class1 and Class2, declared in two header files, "class1.h" and "class2.h". Each class contains a member instance of the other class. If I #include the necessary header files as standard, then I get a compiler error because it creates an unlimited referencing loop. How can I solve this?

Thanks!

Code:
//"class1.h"

#include "class2.h"

class Class1
{
    Class2 a_class2;
};


//"class2.h"

#include "class1.h"

class Class2
{
    Class1 a_class1;
};