Preprocessor
The task of the preprocessor is to work through the files to be compiled before the actual compilation and to implement so-called directives
. These directives are mainly used to include additional files, define macros, control conditional compilation and manipulate compiler errors.
Most Important Directives
Conditional Compilation
#if
Conditional compilation
#else
Else part of a conditional compilation
#elif
Consecutive condition of a conditional compilation
#endif
End of a conditional compilation
#ifdef
Conditional compilation when a macro exists
#ifndef
Conditional compilation when a macro does not exists
Compiler Control
Other Preprocessor Elements
Rare Directives
#ident
Identification directive
#sccs
BSD specific directive