【发布时间】:2013-09-25 01:07:18
【问题描述】:
我有这个代码:
main.h
#ifndef MAINH
#define MAINH
...
#include "my_struct.h"
void some_func(my_structure *x);
...
#endif
和
my_struct.h
#ifndef UTILSH
#define UTILSH
...
#include "main.h"
...
typedef struct abcd {
int a;
} my_structure;
...
#endif
但是当我尝试编译时我得到了这个:error: unknown type name ‘my_structure’
知道为什么吗?
【问题讨论】: