|
|
|
|
|
|
|
Most of your source code files are written in C++. Your source code files are interpreted by the compiler and turned into your program. Before the compiler runs, however, the preprocessor runs, and this provides an opportunity for conditional compilation. In this hour, you will learn |
|
|
|
|
|
|
|
|
What conditional compilation is and how to manage it |
|
|
|
|
|
|
|
|
How to write macros using the preprocessor |
|
|
|
|
|
|
|
|
How to use the preprocessor in finding bugs |
|
|
|
|
|
|
|
|
The Preprocessor and the Compiler |
|
|
|
|
|
|
|
|
Every time you run your compiler, your preprocessor runs first. The preprocessor looks for preprocessor instructions, each of which begins with a pound symbol (#). The effect of each of these instructions is a change to the text of the source code. The result is a new source code file: a temporary file that you normally don't see, but that you can instruct the compiler to save for later examination. |
|
|
|
|
|