BeInclude.h
#ifdef _BEINCLUDE_H_
int nBeInclude;
#endif
DefineStruct.h
typedef struct{
int nDef;
#define _BEINCLUDE_H_
#include "BeInclude.h"
#undef _BEINCLUDE_H_
}TEST;
引用:
#include "DefineStruct.h"
void main()
{
TEST testA;
testA.nDef = 1;
testA.nBeInclude = 2;
printf("testA.nDef = %d,testA.nBeInclude = %d/n",
testA.nDef,
testA.nBeInclude);
}