cpp - The C Preprocessor
The C preprocessor, often known as cpp, is a macro
processor that is used automatically by the C
compiler to transform your program before
compilation. It is called a macro processor
because it allows you to define macros, which are
brief abbreviations for longer constructs.
cpp -P inputfile -o outputfile
#include "file"
#define FOO
#define FOO "hello"
#undef FOO
#ifdef DEBUG
console.log('hi');
#elif defined VERBOSE
...
#else
...
#endif
#if VERSION == 2.0
#error Unsupported
#warning Not really supported
#endif
#define DEG(x) ((x) * 57.29)
#define DST(name) name##_s name##_t
DST(object); #=> object_s object_t;
#define STR(name) #name
char * a = STR(object); #=> char * a = "object";
#define LOG(msg) console.log(__FILE__, __LINE__, msg)
#=> console.log("file.txt", 3, "hey")