?? delete.c
字號:
#include<stdio.h>
#include"def.h"
struct student * del(struct student * head, long num)
{
struct student *p1,*p2;
if(head==NULL)
{printf("\nList null!\n");goto end;}
p1=head;
while((num!=p1->num)&&(p1->next!=NULL))
{
p2=p1;
p1=p1->next;
}
if(num==p1->num)
{
if(p1==head)
head=p1->next;
else
p2->next=p1->next;
printf("\nthe value %ld was deleted!\n",num);
n=n-1;
}
else
printf("\nThe value %ld is not found!\n",num);
end:
return (head);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -