Original Post
Hi,
I''m having trouble making a Class Object Global.
I have a CPlayer class which hold my player info and so on.
And I have a
main.cpp <- holds the main routine.
DirectInput.cpp <- Input
GameCore.cpp <- The game loop
CPlayer.CPP <- Class define
CPlayer.H <- Class define
The problem is that I can''t make my CPlayer Player; Global so I can use it in every one of my source files.
If I initalize CPlayer Player in my main.h file (which is linked to all the other files) I just get a compile error, like it doesnt know what CPlayer but I did include it.
Can''t I Init my CPlayer Player; in a header file? It works fine in one of my CPP files, but the problem is that if I create my Player object in one of my CPP files, I can''t use Player else where.
How Do I make my Player global?
thanks for your time