May 2017
Intermediate to advanced
590 pages
17h 18m
English
To conditionally compile portions of code, use the #if, #ifdef, and #ifndef directives (with the #elif, #else, and #endif directives). The general form for conditional compilation is as follows:
#if condition1 text #elif condition2 text #elif condition3 text #else text #endif
To define macros for conditional compilation, you can use either of the following:
#define DEBUG_PRINTS #define VERBOSITY_LEVEL 5
for example, cl /DVERBOSITY_LEVEL=5.
Read now
Unlock full access