写在前面:犯了个小错误,在复习链表的知识点时,typedef定义节点出错。因为没有在结构体里面定义指针的Node前加上structure
错误的:
typedef struct Node
{
int data;
Node *next;
}Node,*List;
正确的:
typedef struct Node
{
int data;
struct Node *next;
}Node,*List;
写在前面:犯了个小错误,在复习链表的知识点时,typedef定义节点出错。因为没有在结构体里面定义指针的Node前加上structure
错误的:
typedef struct Node
{
int data;
Node *next;
}Node,*List;
正确的:
typedef struct Node
{
int data;
struct Node *next;
}Node,*List;