/*module1.h*/
extern int a; /* 在模块1的.h文件中声明int a */
/*module1 .c*/
#include "module1.h" /* 在模块1中包含模块1的.h文件*/
int a = 5; /* 在模块1的.c文件中定义int a */
/*module2 .c*/
#include "module1.h" /* 在模块2中包含模块1的.h文件*/
/*module3 .c*/
#include "module1.h" /* 在模块3中包含模块1的.h文件*/
|
|