class CLASS1{
public:
void function(CLASS2 *);
};
class CLASS2{
public:
void function(CLASS1 *);
};
There seems to be no way to solve this. Is it possible to predefine something like that?
Any solutions?
Sludge Software
www.sludgesoft.com
Developing a secret of mana style role-playing-game
Class trouble
I have defined 2 classes and both need a pointer to another class like this:
Sludge Softwarewww.sludgesoft.comDeveloping a secret of mana style role-playing-game
You need to predefine CLASS2 before using it within CLASS1, like so:
class CLASS2;
class CLASS1{
public:
blah blah
};
class CLASS2;
class CLASS1{
public:
blah blah
};
Hi
Maybe I misunderstood your question but why not two header files one for class1 and one for class2 and then include the one in the other ? Maybe you are talking about an compledly different problem than just ignore this post.
Maybe I misunderstood your question but why not two header files one for class1 and one for class2 and then include the one in the other ? Maybe you are talking about an compledly different problem than just ignore this post.
May the force be with you
Thanks
Just the information I needed.
Just the information I needed.
Sludge Softwarewww.sludgesoft.comDeveloping a secret of mana style role-playing-game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement