circular-dependency

C++ circular reference problem

Hello, I have 2 classes: DataObject and DataElement. DataObject holds pointers to (only) DataElements, and a DataElement contains pointers to several types, among which a DataObject. This used to be no problem, since I only use pointers to DataObjects in DataElement, so a forward declaration of DataObject in the header of DataElement i...

Circular Dependency in C++

The facts: I have two predominant classes: Manager and Specialist. There are several different types of Specialists. Specialists often require the help of other Specialists in order to get their job done. The Manager knows all of the Specialists, and initially each Specialist knows only their Manager. (This is the problem.) At runti...