How i declar a global variable,i have a project, a header file and 2 .cpp files, and if i declare in header : int x; there will be a error if i use this 'x' in the .cpp file.
i don't kno why, pls help
thks
This works perfectly with my compiler. I havent seen a construction with 2 cpp files before, i dont know or that causes problems (in this case, there is no link between those files), and i need to use <header.h> instead of "header.h".
Hoop this helps