D. Preprocessor Directives
The C++ preprocessor can perform a number of useful actions before the regular compilation phase. For example, the #define directive can be used to replace all occurrences of a certain word with another—creating easy-to-interpret symbolic constants rather than arbitrary-looking numbers. The directives have other uses, the most important of which are probably including header files and making sure that such header files are compiled only once.
In addition to the directives listed here, C++ also supports a #pragma directive, but its use is entirely implementation defined. See your compiler documentation for more information.
This appendix covers the directives in alphabetical order, followed by a list of predefined compiler ...
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