Understand the role of #include, #define, and conditional compilation.
The C++ preprocessor scans the source code for directives (lines starting with `#`) before the code is passed to the compiler. It performs text-based transformations on the code. **`#include`** is the most common directive; it tells the preprocessor to find the specified file and insert its entire contents at that point. This is how you gain access to declarations in header files like `<iostream>` or `<vector>`. **`#define`** is used to create macros. In its simplest form, it creates a symbolic constant: `#define PI 3.14`. The preprocessor will replace every occurrence of `PI` with `3.14` in the code. More complex macros can take arguments, like `#define SQUARE(x) (x * x)`. While sometimes useful, macros can be dangerous because they are simple text substitutions and don't respect scope or type safety. In modern C++, `const` variables are preferred for constants, and inline functions or templates are preferred over function-like macros. **Conditional Compilation** directives (`#if`, `#ifdef`, `#ifndef`, `#else`, `#endif`) allow you to control which parts of your code get compiled. For example, you can have platform-specific code or debugging code that is only included in certain builds. This is heavily used for writing cross-platform applications and for creating header guards to prevent multiple inclusions of the same header file.