Quote:
|
Originally Posted by DaWei
Declare it external in the header and put the Real Thang in one source file. Why are you doing this? Practice? One rarely needs a global variable, particularly one named, "x".
|
This is just a test app. I am building an application with many windows and I have an array of HWND vars to hold their handles and I want the array to be global so I can access it anywhere from the application (each window is like a small application so I have different .cpp and .h files for each).
I also have a char array which holds the application name so I can use it in MessageBox() calls throughout my app.
I dont really know which is the right way to do it.