freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

優(yōu)秀畢業(yè)論文——基于c語言實(shí)現(xiàn)電話簿管理系統(tǒng)(編輯修改稿)

2024-12-22 16:55 本頁面
 

【文章內(nèi)容簡介】 etchar()。 scanf(%c,amp。saveflag)。 if(saveflag==39。y39。||saveflag==39。Y39。) save (head)。 else printf(\n請(qǐng)?jiān)谕顺龀绦蛑?, 保存當(dāng)前的編輯工作 ! \n)。 return head。 } void print(ID *head) { ID* temp。 temp=head。 system(cls)。/*清屏 */ printf(姓名 : \t電話號(hào)碼 : \n)。 if(head==NULL) { printf(當(dāng)前鏈表為空 , 請(qǐng)先創(chuàng)建新的鏈表或者加載文件 \n)。 } else do { printf(%s\t%s\n,tempname,temptel)。 temp=tempnext。 }while(temp!=NULL)。 } 11 void save(ID *head) { FILE *fp。 ID* t 。 /*定義一個(gè) 可以移動(dòng)的指針,作用:從頭到尾遍歷一遍單鏈表,向文件中寫入 */ if ((fp=fopen(,w))==NULL) { printf(打開文件失敗 ! \n)。 getch()。 exit(1)。 } printf(正在保存文件 , 請(qǐng)稍候 ...\n)。 t=head。 while(t!=NULL) { fwrite(t,sizeof(ID),1,fp)。 t=tnext。 } fclose(fp)。 printf(文件保存成功 \n)。 } ID * load() { FILE *fp。 ID *t1,*t2,*head=NULL。 char ch。 if((fp=fopen(,r))==NULL) /*判斷文件是否存在 */ { printf(打開文件失敗 ! 沒有該文件 \n)。 getch()。 exit(1)。 } ch=fgetc(fp)。 /*判斷文件是否為空 */ 12 if(ch==EOF) { printf(文件 為空 , 請(qǐng)重新建立一個(gè)電話簿 \n)。 return (head)。 } else { printf(文件正在讀取中 ...\n)。rewind(fp)。 } t1=(ID *) malloc(sizeof(ID))。 head=t1。 while(!feof(fp)) { if(fread(t1,sizeof(ID),1,fp)!=1) break。 /*如果沒有讀取的內(nèi)容,則結(jié)束 */ t1next=(ID *)malloc(sizeof(ID))。 t2=t1。 t1=t1next。 } t2next=NULL。 fclose(fp)。 printf(文件讀取完畢 \n)。 return head。 } void search(ID* head) { printf(歡迎使用查找功能 , 只需要輸入待查找者姓名的首字母 : \n)。 ID* p。 int flag,searchflag=1。 char c,choice。 while(searchflag) { flag=0。 printf(\n請(qǐng)輸入待查找者姓名的首字母 : \n)。 scanf(%c,amp。c)。 getchar()。 p=head。 while(p!=NULL) { if(pname[0]==c) 13 { printf(姓名 : %s\t電話號(hào)碼 : %s\n,pname,ptel)。 flag=1。 } p=pnext。 /*p1指針向后移動(dòng)一位 */ } if(flag==0) printf(\n對(duì)不起 ,未能找到符合條件的記錄 \n)。 printf(\n查找完畢 , 是否需要重新查詢 ? Y/N)。 scanf(%c,amp。choice)。 getchar()。 if(choice==39。y39。||choice==3
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1