Re: [Dev-C++] declaring two classes with pointers to each other?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Phil S. <fy...@qw...> - 2001-07-01 17:29:49
|
Thanks for the clarification. I thought I had tried that, but I put in empty brackets, which gave me redeclaration errors. so close... Szczepan Holyszewski wrote: > > ----- Original Message ----- > From: "Phil Schulz" <fy...@qw...> > To: <dev...@li...> > Sent: Sunday, July 01, 2001 1:21 AM > Subject: [Dev-C++] declaring two classes with pointers to each other? > > > > > I want to create two classes that contain > > pointers to each other, but I keep getting > > "Syntax error before *" I know a class can > > contain a pointer to itself, but why not to > > others before it is fully defined? > > You are forgetting forward declarations. Here are your > files fixed. I removed the irrelevant "using namespace std;" > directives. > > Hope this helps. > > Szczepan Holyszewski > ru...@po... > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users -- Fy...@qw... |