|
From: Jeffrey W K. <ki...@ju...> - 2001-12-24 20:11:06
|
Hello to the group;
And thanks to all those who are taking the time to answer all the
questions! I hope that someone can help me with this one. I am trying
to create classes which reference each other's interface functions. The
classes are Device and Bus. According to the book I've been using, the
thing to do is to include the line:
class Bus;
just before the Device declaration (or vice versa). When I do this, I
get two errors from the compiler- One for the use of an undeclared class
(Bus), and one for a forward declaration of class Bus. What I need to
know is- is there something inherently wrong in a forward declaration?
Or does Dev C++ have a problem with such declarations? And if so, how do
you tell two interdependant classes about each other, so that you don't
have to declare them simultaneously!
Thanks in advance.
Jeff |