Most compilers will allow you to define a macro from the command line (e.g. g++ -DDEBUG something.cpp), but you can also just put a define in your code like so: #define DEBUG Some resources: Wikipedia article; C++ specific site; Documentation on GCC's preprocessor; Microsoft reference; C specific site (I don't think it's different from the C++ ... More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.