Hour 21. The Preprocessor

Most of your source code files are written in C++. Your source code files are translated by the compiler into machine code which is ready to be executed by the computer. 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

Get Sams Teach Yourself C++ in 24 Hours, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.