Suppose I created a class, say Parent, that has a compound relationship with Child. The parent class contains a list of children.
I want all children to contain a reference to the parent, so each child element contains a pointer Parent.
This will cause a circular inclusion. I refer to Childin parent.h and I refer to Parentin child.h. Therefore, Parentyou will need to include Child, which should include Parent.
What is the best way to get around this?
source
share