C6001疑惑
Node* pre = head;
Node* cur = head->next;
Node* tmp = NULL;
while (cur != NULL)
{
if (cur->id != x)//警告 C6001 使用未初始化的内存“*cur”
//这不是很懂,循环条件都是cur非空了,为什么还是未初始化
{
pre = cur;
cur = cur->next;
continue;
}
tmp = cur;
cur = cur->next;
pre->next = cur;
free(tmp);
}