Wanting both cPlayer and cSquare to be able to know about each other but I do not want both includes to mess each other up. I have *learnt* about heading guarders however I still receive a
> syntax error: identifier cPlayer
This is problematic as I plan on including a cSquare vector in cPlayer which is why I would like them both know about each other. Could someone enlighten me in this situation?
> including a cSquare vector in cPlayer
> which is why I would like them both know about each other.
¿why should `cSquare' know anything about `cPlayer'?
For a vector, a forward declaration should suffice.
It's just a pointer so the compiler only needs to know that cSquare is a class, so a forward declaration of cSquare should be enough in the header. In the source file, where you actually use the cSquare class, you probably need to include the cSquare header file but that is not a problem.