Definitions
The preprocessor is a part of the C++ compiler that modifies the source code of a program seen by the rest of the compiler; thus, the name “preprocessor”. The preprocessor is needed to accomplish tasks that cannot be done by the rest of the compiler, e.g., to prevent declarations in a header file from being processed twice for the same implementation file.
A preprocessor directive is a command by which we tell the preprocessor to perform a specific task, e.g., to ignore a section of source code under certain conditions.
A preprocessor symbol is a constant value similar to a const that is known only to the preprocessor, not to the rest of the compiler. The rules for naming preprocessor symbols are the same as those for other identifiers, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access