TYPE *delete() { TYPE *pf,*pb; int num; printf("please put in the number of the element which will be deleted:\n"); scanf("%d",&num); if(head==NULL)//list is empty { printf("list is empty!\n"); returnNULL; } pb = head;//不为空则载入列表 while(pb->next !=NULL&& pb->num != num)//当不是要删除的结点,且也不是最后一个结点时,继续循环