Preprocessor Directives
In most other languages, what you write in the source file is what the compiler sees during compilation. This is not the case in C++. The compiler is not the first tool that deals with the source code on its way to becoming an executable program. The first tool that processes the source code is the preprocessor. What is this? Well, it is an interesting invention that C++ inherited from C. Its goal is to decrease the amount of source code that the programmer writes during development (or reads during debugging or maintenance).
The preprocessor processes the source file and passes the results of processing to the compiler for compilation. Most of the program statements are ignored by the preprocessor and are passed to the ...
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