The preprocessor is the first stage of the compilation process in C++ that takes place ahead of the actual code compilation.
It handles code that is denoted with the "#" character; these are known as "preprocessor directives" or just "directives".
It sequentially scans and processes each file, preserving their original content and creating a temporary file containing the code that has been processed. The compiler part converts the temporary file from C++ to machine code in the next step and then removes it.
It is important to remember that the preprocessor doesn't understand C++ syntax; instead, it operates at the text level. It only modifies and substitutes text in the source code prior to the C++ compiler compiling it.
The directives #include and #define are two that are frequently used.