关于多文件间的结构体调用问题,请大家指教
主程序定义了两个结构体
struct ProjectInfo
{
int id;
char name[20];
int target;
int total;
};
struct SalesInfo
{
int id;
int sales;
};
其他文件要调用这两个结构体类型如何实现?
试着在文件内extern struct SalesInfo,不过这样好像不行(想想也不对)
写了个专门的文件放结构体定义,然后所有文件
#include "Basic.h"
也不行
basic.h(6) : error C2011: 'ProjectInfo' : 'struct' type redefinition
没方向了..