I came across this problem:
I have two classes (classA & classB). classA has an inner class: classC
Normally, to create a member of type inner class classC in classB I would do this:
The definitions are in header files.
Now I need classB in classA so I include classB. h in classA.h
A variable of type classC needs to be passed with the constructor of classB.
I can't include classA.h in class be because I already included ClassB. in classA.h
The normal way (I think) to solve this problem (if I needed class A in classB.h is to say that classB is a class like this:
But now I need classC in classB
I solved the problem by taking classC out of classA but techicaly classC is part of classB so I'd rather put it in there.