【发布时间】:2015-04-27 14:50:57
【问题描述】:
我是 c 编程新手,我正在尝试理解 c 中的结构概念 在许多教程中,他们解释了如何使用下面的示例声明结构
struct node
{
int data;
int value;
}
我理解上面的情况,但是在下面的情况下,他们在里面声明了一个结构
struct node
{
int data;
struct node *next; \\ what is this? why they declared like it ?
}
【问题讨论】:
-
那不是嵌套结构。结构体
node的最后一个成员是一个指针,指向struct node的类型。