2011/11/04

[C/C++ basic] Preprocessing #ifdef, #elif, #else

Today I using C/C++ preprocessor to compile my code, But I have a little confuse about "is #elif can work correctly with #ifdef"?
#ifdef TEST_IFDEF
	printf("Test #ifdef");
#elif TEST_ELIF
	printf("Test #elif");
#else
	printf("Test #else");
#endif
And after my trying. It's work well :D

1 則留言: