Original Post
heres my problem. Its really basic so please dont take the piss (too much). I''m programming in c++ (djgpp). I''ve got two classes, called ''enemy'' and ''player''. for collision detection reasons, enemy needs to run player functions AND player needs to run enemy functions. This means that both classes need to be defined before the other. Which is impossible. By looking at other peoples'' programs, I gather that it is possible to ''predefine'' a class to solve this problem:-
class player{
};
class enemy{
player *p;
};
class player{
enemy *e;
};
However, if I do this, I get the error message ''re-definition of class player''. How can I solve this problem????
thanks in advance - felix.