mirror of
https://github.com/Aexiar/c.git
synced 2024-10-22 14:05:45 +02:00
2024年10月9日 15:55
This commit is contained in:
parent
e8f8d3bcda
commit
8795ab908b
@ -944,5 +944,25 @@ int main() {
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
>
|
||||
> 应用场景:用于判断某个宏是否定义过。
|
||||
|
||||
|
||||
|
||||
* 示例:
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(){
|
||||
#ifdef _DEBUG
|
||||
printf("正在使用 Debug 模式编译程序...\n");
|
||||
#else
|
||||
printf("正在使用 Release 模式编译程序...\n");
|
||||
#endif
|
||||
|
||||
system("pause");
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user