Preprocessor

suggest change

Introduction

The C preprocessor is a simple text parser/replacer that is run before the actual compilation of the code. Used to extend and ease the use of the C (and later C++) language, it can be used for:

  1. Including other files using #include
  2. Define a text-replacement macro using #define
  3. Conditional Compilation using#if #ifdef
  4. Platform/Compiler specific logic (as an extension of conditional compilation)

Remarks

Preprocessor statements are executed before your source files are handed to the compiler. They are capable of very low level conditional logic. Since preprocessor constructs (e.g. object-like macros) aren’t typed like normal functions (the preprocessing step happens before compilation) the compiler cannot enforce type checks, they should therefore be carefully used.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Preprocessor:
* Preprocessor
* Macros

Table Of Contents
8 Arrays
11 Loops
39 Streams
51 Unions
56 Lambdas
59 Preprocessor
60 SFINAE
62 RAII
67 Sorting
84 RTTI
87 Scopes
104 Profiling
107 Recursion
117 Iteration
125 Alignment
134 Semaphore
136 Debugging
139 Mutexes
142 decltype