Preprocessor and Macros

George S. Tselikis · 2022

The preprocessor is a software program, typically integrated into the compiler, which processes a C++ program before it is compiled. Its major capabilities involve file inclusion, macro substitution and conditional compilation. At first, we&s;ll discuss how to define and use macros in a C++ program. Because you may meet macros in code, it is useful to know about their potential hazards and misuses. We&s;ll learn safer alternatives in the next chapter. We&s;ll devote the rest of this chapter to describe preprocessor directives and operators.

Read the paper · More papers on PaperTik