链表–删除 :首先要清楚把一个节点删除,要考虑删除节点的上一个节点next指针,不能删除空的东西
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* next;
};
//创建表头
struct Node* createHead()
{
struct Node* headNode = (struct Node*)malloc(sizeof(struct Node));
if (headNode == NULL)
{
return 0;
}
headNode->next =