Last active
August 29, 2015 13:56
-
-
Save kkdai/9014723 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <stdio.h> | |
| #define FOO_Def | |
| #define FOO_Def2 5 | |
| int main(int argc, const char * argv[]) | |
| { | |
| #ifdef FOO_Def | |
| printf ("FOOO\n"); | |
| #endif | |
| // it will print out | |
| #ifdef FOO_Def2 | |
| printf ("FOOO\n"); | |
| #endif | |
| // it will print out | |
| //if (0==FOO_Def) Compiler will error, because FOO_Def don't have any value. | |
| if (0==FOO_Def2) //Need define value for value check. | |
| printf ("FOOO\n"); | |
| return 0; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment