The C++ preprocessor runs before any other compilation happens. Commands given to the preprocessor allow the programmer to define variables, perform text substitution, and test simple conditions.
| # and ## | manipulate strings |
| #define | 定義巨集 |
| #error | 顯示一個錯誤訊息 |
| #if, #ifdef, #ifndef, #else, #elif, and #endif | 條件式編譯 |
| #include | 插入其他檔案的內容(通常是載入附檔名為.h的標頭檔) |
| #line | set line and file information |
| #pragma | implementation specific command |
| #undef | 取消已定義的巨集 |
| Predefined preprocessor variables | miscellaneous preprocessor variables |