内容发布更新时间 : 2024/12/26 3:15:34星期一 下面是文章的全部内容请认真阅读。
} else pCu=pCu->next; } pRF=pRF->next; }/*while*/ pRST=pRST->next; }/*while*/ printf(\ getch(); return 0; }
int shanchuzhonglei(Pfangjianzhonglei * pRST){ const char * szTree=\ const char * szError=\ char Buf[BUFSIZE]; Pfangjianzhonglei pRST2,pRST3; int type; Buf[0]='\\0'; printf(\ scanf(\ pRST2=(*pRST); if(pRST2->zhonglei==type+'0'){ (*pRST)=pRST2->next; free(pRST2); return 0; }/*改变头指针*/ pRST3=pRST2->next; while(pRST3){ if(pRST3->zhonglei==type+'0'){ pRST2->next=pRST3->next; free(pRST3);/*删去pRST3*/ return 1; } } printf(\ getch(); return 0; }
int shanchukefang(Pfangjianzhonglei * pRST_head){
21
const char * szTree=\ const char * szRoom=\ const char * szError[]={\
\
char Buf[BUFSIZE]; Pfangjian pRF,pRF2; Pfangjianzhonglei pRST; int type;
pRST=(*pRST_head);
Buf[0]='\\0';
printf(\ scanf(\ printf(\ scanf(\ while(pRST){ if(pRST->zhonglei==type+'0'){ pRF=pRST->first; if(!strcmp(pRF->num,Buf)){ pRST->first=pRF->next; pRST->shuliang--; free(pRF); return 0; } pRF2=pRF; pRF=pRF->next; while(pRF){ if(!strcmp(pRF->num,Buf)){ pRF2->next=pRF->next;
free(pRF); pRST->shuliang--; return 1; }/*if*/ pRF2=pRF; pRF=pRF->next; }/*while*/ printf(\ return 0; }/*if*/ pRST=pRST->next; }/*while*/ printf(\
22
getch(); return 0; }
int shanchukehu(Pfangjianzhonglei * pRST_head)
{ const char * szName=\ const char * szError=\
char Buf[BUFSIZE]; Pfangjian pRF; Pkehu pCu,pCu2; Pfangjianzhonglei pRST; pRST=(*pRST_head); Buf[0]='\\0'; printf(\ scanf(\ while(pRST){ pRF=pRST->first; while(pRF){ pCu=pRF->Record; if(!strcmp(pCu->name,Buf)){ pRF->Record=pCu->next; free(pCu); return 0; } pCu2=pCu; pCu=pCu->next; while(pCu){ if(!strcmp(pCu->name,Buf)){ pCu2->next=pCu->next; free(pCu); return 0; }/*if*/ pCu2=pCu; pCu=pCu->next; } pRF=pRF->next; }/*while*/ pRST=pRST->next; }/*while*/ getch(); return 0; }
23
int xiugaikefangzhonglei(Pfangjianzhonglei pRST)
{ const char * szTree=\ const char * szRoom=\ const char * szError[]={\
\
char Buf[BUFSIZE]; Pfangjian pRF; int type; Buf[0]='\\0'; printf(\ scanf(\ printf(\ scanf(\ while(pRST){ if(pRST->zhonglei==type+'0'){ pRF=pRST->first; while(pRF){ if(!strcmp(pRF->num,Buf)){ xiugaikefangxinxi(pRF);
return 1; }/*if*/ pRF=pRF->next; }/*while*/ printf(\ return 0; }/*if*/ pRST=pRST->next; }/*while*/ printf(\ getch(); return 0; }
int xiugaikehu(Pfangjianzhonglei pRST) { const char * szName=\ const char * szError=\
char Buf[BUFSIZE]; Pfangjian pRF;
24
Pkehu pCu; Buf[0]='\\0'; printf(\ scanf(\ while(pRST){ pRF=pRST->first; while(pRF){ pCu=pRF->Record; while(pCu){ if(!strcmp(pCu->name,Buf)){ xiugaikehuxinxi(pCu); return 0; } else pCu=pCu->next; } pRF=pRF->next; }/*while*/ pRST=pRST->next; }/*while*/ printf(\ getch(); return 0; } #define GF_TITLES 8 int huodekehuxinxi(Pkehu pCu) { int i; char * Temp[GF_TITLES]; char * szCustom[]={ \ \ \ \ \ \ \ \ for(i=0;i
25