// 单链表删除pos位置之后的值voidSListEraseAfter(SListNode* pos){assert(pos);
SListNode* next = pos->next;if(next){
pos->next = next->next;free(next);
next =NULL;}}
单链表的销毁 链表不像顺序表连续删头就可以,由于链表是一个一个分散的结点,需要逐一删除
// 单链表的销毁voidSListDestory(SListNode** pplist){assert(*pplist);
SListNode* cur =*pplist;while(cur){
SListNode* next = cur->next;free(cur);
cur = next;}*pplist =NULL;}