预处理命令#include

    • 作用:将#include 所包含的文件内容拷贝到当前文件,一般用于包含头文件[xxx.h]。
    • 使用:

    1. #include <>: 表示引用标准库头文件,编译器会从系统配置的库环境中去寻找 2. #include “xxx.h” “”: 一般表示用户自己定义使用的头文件,编译器默认会从当前文件夹中寻找,如果找不到,则到系统默认库环境中去寻找。

    1. #include <stdio.h> // 标准输入输出头文件
    2. #include <stdlib.h> // 标准工具库头文件
    3. int main(void)
    4. {
    5. printf("hello 15pb\n");
    6. system("pause");
    7. return 0;
    8. }