删除单链表的第一个结点

tech2023-10-29  101

ElemType DeleteFront(SqList &HL) { if(HL==NULL) { cerr<<"空表"<<endl; exit(1); } LNode *p=HL; HL=HL->next; ElemType temp=p->data; delete(p); return temp; }

 

最新回复(0)