|
|
int main(int argc, char* argv[])
{
int a = 0;
#if MY_OPTION == 0
a++;
#elif MY_OPTION == 1
a += 1;
#elif MY_OPTION == 2
a += 2;
#else
a--;
#endif
return 0;
}
| |
|
この場合は
|
int main(int argc, char* argv[])
{
int a = 0;
a++;
return 0;
}
| |
|
|
|
|
#define MY_OPTION 0
int main(int argc, char* argv[])
{
int a = 0;
#if MY_OPTION == 0
a++;
#elif MY_OPTION == 1
a += 1;
#elif MY_OPTION == 2
a += 2;
#else
a--;
#endif
return 0;
}
| |
|
この場合も
|
int main(int argc, char* argv[])
{
int a = 0;
a++;
return 0;
}
| |
|
|
|
|
#define MY_OPTION 1
int main(int argc, char* argv[])
{
int a = 0;
#if MY_OPTION == 0
a++;
#elif MY_OPTION == 1
a += 1;
#elif MY_OPTION == 2
a += 2;
#else
a--;
#endif
return 0;
}
| |
|
この場合は
|
int main(int argc, char* argv[])
{
int a = 0;
a += 1;
return 0;
}
| |
|
|
|
|
#define MY_OPTION 2
int main(int argc, char* argv[])
{
int a = 0;
#if MY_OPTION == 0
a++;
#elif MY_OPTION == 1
a += 1;
#elif MY_OPTION == 2
a += 2;
#else
a--;
#endif
return 0;
}
| |
|
この場合は
|
int main(int argc, char* argv[])
{
int a = 0;
a += 2;
return 0;
}
| |
|
|
|
|
#define MY_OPTION 99
int main(int argc, char* argv[])
{
int a = 0;
#if MY_OPTION == 0
a++;
#elif MY_OPTION == 1
a += 1;
#elif MY_OPTION == 2
a += 2;
#else
a--;
#endif
return 0;
}
| |
|
この場合は
|
int main(int argc, char* argv[])
{
int a = 0;
a--;
return 0;
}
| |
|
|
|