今天总算弄明白了struct数据结构啦。
struct node
{
int data;
node * next;
};
node* head;
在c++中是可以的
在c语言中,必须定义为 struct node* head;
typedef struct node
{
int data;
node * next;
}a;
此时的a 等价于struct node
于是定义a* head;
struct node是一种数据类型,为这个数据类型声明变量名字。
比如int , int a;