【发布时间】:2014-09-12 07:09:28
【问题描述】:
以下声明有效。
struct node
{
int a;
struct node *next;
};
但是,当我们定义以下内容时,它会给出错误。
"error: field ‘next’ has incomplete type"
为什么会这样?
struct node
{
int a;
struct node next; /* Not a pointer */
};
【问题讨论】:
-
是的,我已经更正了