ne555: Thank you for the instruction on that; that helped a lot. I'm having a bit of difficulty applying it to my real-life problem, though. Here's the situation:
1. I have a class Soc, whose objects will contain many other classes.
2. One such class is ModCicComb.
3. The Soc class needs to know about ModCicComb's public functions, and vice versa.
So, my ModCicComb.h file contains:
1 2 3 4 5 6 7 8 9 10
|
#include "soc.h"
class ModCicComb
{
Soc* pSoc;
.
.
.
}
|
And the Soc.h file contains:
1 2 3 4 5 6 7 8
|
#include "ModCicComb.h"
Class Soc
{
ModCicComb mcc;
.
.
.
}
|
(all header files include guards)
The compiler objects because when soc.h includes modciccomb.h before defining the Soc class. I can think of a couple ways to solve this, but they're a little messy. Do you have a suggestion? Whatever the solution is, will be replicated in about 20 files (so mathhead's use of a parent class looks a little better now!).
Thanks...I hope I made this problem description clear.