【发布时间】:2009-10-09 17:58:40
【问题描述】:
我的头文件中有如下代码:
typedef struct _bn bnode;
我可以的
bnode b;
很好,但是
b[i],其中 i 是一个 int 给我以下错误:
未定义类型“struct _bn”的使用无效
有什么想法吗?
【问题讨论】:
-
你甚至不能写一个'
bnode b;',因为编译器不知道要分配多少空间。不过,您可以写“bnode *bp;”。
标签: c struct compiler-errors opacity