I'm new to C++ i'm coding in unmanaged C++.NET (unmanaged makes it standard C++). I have a question about global variables. I need to define a global variable that is seen by all my files in my project. I use "basicheader.h" to store all my definitions for all my files since all my files use everything in it. This is the way I'm doing global variables:
int a, b,c;
extern int a,b,c;
I'm figuring that this is exporting the variable dll style. And compiling takes a long time. Is there any other way to do global variables? And one more thing, why does everytime I do an error in "basicheader.h" I see it many times in the output? Like, I get the same error many times. I'm guessing it compiles the file everytime it's included but I put "#pragma once" (the same to #!indef basicheader | #define basicheader | ... | #edef; or something like that, I'm not sure of the keywords ). I'm not using a precompiled header.
Thanks in advance,