头文件包含
第二种形式 #include “文件名” 系统现在源程序当前目录下寻找,若找不到,再到操作系统的path路径中查找,最后才到C语言库函数 头文件所在目录中查找.
#include指令允许嵌套包含,比如a.h包含b.h, b.h包含c.h,但是不允许递归包含,比如a.h 包含b.h, b.h包含a.h.
#include<stdio.h>
#include "one.h"
#include "two.h"
int main()
{
return 0;
}
#ifndef _ONE_H_
#define _ONE_H
void one();
#endif
#ifndef _TWO_H
#define _TWO_H
#include "one.h"
void two();
#endif