View Single Post
Old Nov 14th, 2005, 1:01 PM   #8
some1
Programmer
 
Join Date: Dec 2004
Posts: 50
Rep Power: 4 some1 is on a distinguished road
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.
some1 is offline   Reply With Quote