括号里的current!=NULL是不是应该改成head!=NULL?
3条回答 默认 最新
- CSDN专家-天际的海浪 2022-02-02 23:13关注
是的, 应该改成head!=NULL
这样好一些while(head !=NULL){ current = head; head = head->next; free(current); }
如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用
是的, 应该改成head!=NULL
这样好一些
while(head !=NULL){
current = head;
head = head->next;
free(current);
}
如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!