Re: Using define's to turn on/off functionality Programming Software Development by Duoas That is typically something handled by the build process. If you want to have the #defines in every file, you can specify the flag, or not, in your Makefile(s). Here's an example makefile that builds a program "foo" from the following files: foo.cpp baz.h baz.cpp quux.h quux.cpp If compiling on Windows, it will automatically… Re: Using define's to turn on/off functionality Programming Software Development by daviddoria ah great! so g++ -DGRAPHICS is the same as having all the files being compiled having a #define GRAPHICS 1 ? so then I could even use if(GRAPHICS) instead of #ifdef GRAPHICS ? Thanks, Dave Re: Using define's to turn on/off functionality Programming Software Development by Duoas No, it is the same as all the files having a [inlinecode]#define GRAPHICS[/inlinecode] To have a value: [inlinecode]g++ -DGRAPHICS=1[/inlinecode] --> [inlinecode]#define GRAPHICS 1[/inlinecode] [inlinecode]if (GRAPHICS)[/inlinecode] will work if and [i]only[/i] if GRAPHICS is [i]always[/i] defined to have some value (such as 0 or 1). That …