|
| fireVein (8) | |||
Hi, I have a question. When I try to do this..
... I get errors. Basically I am including player.h into socket.h in order to make a pointer to the Player class, however I am also including socket.h into player.h so that i can make a pointer to the Socket class. The problem is socket.h already includes player.h so I am effectively including player.h into player.h.. which is causing me compile problems. So what would be the best way to do this? Basically I am trying to make an object of the Player class and Socket class to both have a pointer pointing at each other. | |||
Last edited on | |||
| hamsterman (167) | |||
you have to declare a class before you use it. I hope this helps | |||
| fireVein (8) | |
| Thank you very much for the reply, it helped a lot! | |
This topic is archived - New replies not allowed.
