It's been a long time since I've done C++ and I'm running into some trouble with classes referencing each other.
Right now I have something like:
a.h
class a
{
public:
a();
bool skeletonfunc(b temp);
};
b.h
class b
{
public:
b();
bool skeletonfunc(a temp);
};
Since each one needs a reference to the other, I've found I can't do a #include of each other at the top or I end up in a weird loop of sorts with the includes.
So how can I make it so that a
can use b
and vice versa without making a cyclical #include problem?
thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…