私は持っている
struct node
{
int value;
struct node next;
};
これを行うと、エラーが発生しますfield next has incomplete type
しかし、このような構造を宣言すると正常に動作し、
struct node
{
int value;
struct node *next;
};
そのエラーはなぜですか?コンパイラは、構造体ノードが既に宣言されていることを知ることができます。