Click here to Skip to main content
15,889,527 members

Comments by yeswekey (Top 1 by date)

yeswekey 22-Jul-14 6:06am View    
Thanks for sharing the reason, but you didn't mention the solution. Anyway here is what I did:

// in A.h
class A {
B b;
C c;
};

// In B.h
class A; // This solved it and don't include A.h
class B{
A *parent;
};

// in C.h
class A; // Here too.
class C{
A *parent;
};

Now in B.cpp and C.cpp , include A.h and continue coding.