Preprocessor Commands

The C++ preprocessor runs before any other compilation happens. Commands given to the preprocessor allow the programmer to define variables, perform text substitution, and test simple conditions.

# and ##manipulate strings
#definedefine macrodefinition
#errordisplay an error message
#if, #ifdef, #ifndef, #else, #elif, and #endifconditional operators
#includeinsert the contents of another file
#lineset line and file information
#pragmaimplementation specific command
#undefused to undefine macrodefinitions
#warningdisplay a warning message
Predefined preprocessor variablesmiscellaneous preprocessor variables