【小白】数据结构结点怎么定义?


typedef struct LNode
{
    int data;         
    struct LNode *next;
}LNode;                

这里的指针为什么可以这样定义?

// 结点的定义
struct node
{
int data; // 数据域
struct node* next; // 指针域 
};

在上面数据结构中,struct node* head表示链表的头结点,head->next表示为头结点head的后继结点;而head则为head->next的前驱结点。