Ok i have a problem, I want to do some conditional compilation using some #define's but I have to do them in every file that uses this conditional compiling and its anoying, even if i put it into a header file and then include that header somewhere else the #define is not recognized in the other file, ex:
When I try this MSVC keeps complaining about USERDEF being undefined and this i really dont want to have to do the #define in all the files that use the conditional compilation, any way around this b/c im pretty new to messing w/ the preprocessor.Code://file Test1.h #define USERDEF 1 //file Test2.h #include"Test1.h" int SomeFunc() {#ifdef USERDEF // code here #elif !defined USERDEF // other code here return(something); }