Mega Code Archive
Categories
/
C
/
Macro Preprocessor
Ifdef preprocessor
#include
#define DOG int main(void) { #ifdef DOG printf("DOG is defined.\n"); #endif #undef DOG #ifdef DOG printf("This line is not compiled.\n"); #endif return 0; }