数据结构链对为什么要定义两个结构体?

为什么数据结构的队链要定义两个结构体,之前的单链表等都只有一个结构体,结构体每行的解释能不能具体解释下?最好能讲解一些数据结构结构体的知识,谢谢啦
typedef struct qnode
{ Elemtype data;
struct qnode *next;
} QNode;

typedef struct
{ QNode *front,*rear;
} LiQueue;

typedef struct qnode //队列的结点元素
{
Elemtype data; //结点的数据
struct qnode *next;//当前结点的下一个结点指针地址。
} QNode;

typedef struct //这个结构体可有可无
{
QNode *front,*rear;//队列的首结点和尾结点指针。
} LiQueue;
温馨提示:答案为网友推荐,仅供参考
相似回答