预处理命令#include
- 作用:将#include 所包含的文件内容拷贝到当前文件,一般用于包含头文件[xxx.h]。
- 使用:
1. #include
<>: 表示引用标准库头文件,编译器会从系统配置的库环境中去寻找 2. #include “xxx.h” “”: 一般表示用户自己定义使用的头文件,编译器默认会从当前文件夹中寻找,如果找不到,则到系统默认库环境中去寻找。
#include <stdio.h> // 标准输入输出头文件
#include <stdlib.h> // 标准工具库头文件
int main(void)
{
printf("hello 15pb\n");
system("pause");
return 0;
}