void DeleteList(CircleList L, int i)// 删除表中第i个元素
{
CircleList head = (CircleList*)malloc(sizeof(CircleList));
CircleList r = (CircleList*)malloc(sizeof(CircleList));
head = L;
r = head;
int j = 0;
while (r && (i - 1) > j)
{
r = r->next;
j++;
}
CircleList m = (CircleList*)malloc(sizeof(CircleList));
m= r->next;
assert(m);
r->next = m->next;
free(m);
L = head;
printf("del ok\n");
}
这个函数总是运行不出来为什么呢?