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

正文內(nèi)容

車友信息管理系統(tǒng)程序設(shè)計-在線瀏覽

2024-11-12 21:39本頁面
  

【正文】 e input your choice again!\n)。 saveFile(head)。 } file,h include include include void createFile() //建立初始的數(shù)據(jù)文件 { Type data。 FILE *fp。 //若打開失敗,輸出提示信息,退出 exit(0)。 scanf(%d,amp。 printf(input Carfriends\39。 for(i=1。i++) { readNode(amp。 fwrite(amp。 //將剛才讀入的一條記錄寫入文件 printf(\n)。 //關(guān)閉文件 } struct node *readFile(struct node *head) //將文件中的內(nèi)容讀出置于單鏈表中 { Type data。 head=NULL。 //如果打開失敗輸出提示信息,退出 exit(0)。data,sizeCfr,1,fp)。//從文件中讀出后按年齡順序插入鏈表 fread(amp。//再讀出下一條記錄 printf(\n)。 //關(guān)閉文件 return head。 FILE *fp。 //如果打開失敗,輸出提示信息,退出 exit(0)。 return 。pnext,sizeCfr,1,fp)。 //p 指針后移,準(zhǔn)備處理下一個結(jié)點(diǎn) } fclose(fp)。 //后插法新建鏈表 struct node *CreateForward()。 //按序插入法新建鏈表 struct node *printList(struct node *head)。 //單鏈表的查找 struct node *InsertAfter(struct node *head,Type data)。 //有序插入 struct node *Delete(struct node *head,Type data)。 //單鏈表的逆置 struct node *printList(struct node *head) //鏈表的遍歷 { struct node *p。 //輸出提示信息,然后返回 return NULL。p。 //p 非空時執(zhí)行循環(huán)體,調(diào)用 printNode函數(shù)輸出結(jié)點(diǎn)的元素值 printf(\n)。 //然后換行 return head。 //tail用來定位于當(dāng)前鏈表中最后一個結(jié)點(diǎn)位置 Type data。 //鏈表未建時對頭指針和尾指針進(jìn)行清零處理 tail=NULL。 readNode(amp。 //調(diào)用 readNode 輸入一個結(jié)點(diǎn)的數(shù)據(jù)域的值 while(!endWith(data)) //endWith(data)函數(shù)值為真時結(jié)束鏈表結(jié)點(diǎn)的生成 { p=(struct node *)malloc(size)。 //數(shù)據(jù)域賦值 pnext=NULL。 else //鏈非空時,將 p 置于 tail所指結(jié)點(diǎn)之后 tailnext=p。 //使指向新的鏈尾,便于下次插入 readNode(amp。 //繼續(xù)讀入下一個結(jié)點(diǎn)的數(shù)據(jù)域的值 } return head。 Type data。 //鏈表未建時對頭指針進(jìn)行清零處理 printf(Input data end with 0:\n)。data)。 //利用指針 p 申請結(jié)點(diǎn)的動態(tài)空間 pdata=data。 //新結(jié)點(diǎn)的 指針域賦值為 head head=p。data)。 //返回頭指針 } void Revise(struct node *head,char s[20],long a) { struct node *p。 if(head==NULL) //如果鏈表原來就為空 { printf(\nNO Records\n)。 //返回空指針 } for(p=head。p=pnext) { if(pdata .VIPnum==aamp。strcmp(p,s)==0) { count=1。pdata)。 } } if(count==0) printf(it is not in the list!\n)。 } struct node *SearchNode(struct node *head,Type data,int condition) //單鏈表的查找 { struct node *p=head。 if(head==NULL) //如果鏈表原來就為空 { printf(\nNO Records\n)。 //返回空指針 } while(p) { if(equal(pdata,data,condition)==0) { printHead()。 printf(\n)。 } p=pnext。 return 0。 p=(struct node*)malloc(size)。 //數(shù)據(jù)域賦值 pnext=NULL。 //修改頭指針 return head。 //鏈表原來非空,則指針 p1 從頭指針開始 while(p1next) //如果指針還沒有指向鏈表的最后一個結(jié)點(diǎn)處 { p1=p1next。 //將新結(jié)點(diǎn)連在 p1 之后 return head。 p2=head。 //利用指針 p 申請動態(tài)空間 pdata=data。 //指針域直接賦值為空,以后根據(jù)插入位置再修改 if(head==NULL) //原鏈表為空時的插入 { head=p。 } //原鏈表不為空時的插入, larger 是一個通用函數(shù) while(p2amp。larger(pdata ,p2data,condition)) //第一參數(shù)大于第二參 數(shù),返回真 { p1=p2。 } if(head==p2) //如果要在最前面插入,則要修改 head 指針 head=p。 pnext=p2。 //返回頭指針 } struct node *CreateInsert() //按序插入法新建鏈表 { struct node *head。 head=NULL。 readNode(amp。 //調(diào)用 readNode 輸入一個結(jié)點(diǎn)的數(shù)據(jù)域的值 while(!endWith(data)) //endWith(data)函數(shù)值為真時結(jié)束鏈表結(jié)點(diǎn)的生成 { head=InsertOrder(head,data,1)。data)。 //返回頭指針 } struct node *Delete(struct node *head,Type data) //刪除結(jié)點(diǎn) { struct node *p=head,*q=NULL。 return head。amp。 //如果沒有找到要刪除的結(jié)點(diǎn),則 p 和 q同時向后移 p=pnext。 //修改的域,使 p 的后繼成為 q 的后繼 else //如果刪除的是第一個結(jié)點(diǎn)( q 保持初值 NULL) head=headnext。 //釋放指針 p 所指向的結(jié)點(diǎn)空間 } else //如果沒有待刪除的點(diǎn) printf(it is not in the list.\n)。 //返回頭指針 } struct node *Recerse(struct node *head) //單鏈表的逆置 { struct node *p=head,*q。 //head 置為空值 while(p) //用遍歷思想 { q=pnext。 //修改 p 的 next 域,前趨變后趨 head=p。 //p 移向原鏈表的下一個結(jié)點(diǎn)處,再進(jìn)行處理 } return head。 char name[10]。 char job[10]。 char brand[10]。 char colour[8]。 typedef struct Carfriend Type。 //車友信息所需要的內(nèi)存空間大小 struct node { Type data。 }。 //結(jié)點(diǎn)所需要的內(nèi)存空間的大小 include include void printHead() //打印表頭函數(shù) { printf(%8s%9s%9s%9s%7s%7s%13s%7s%7s\n,會員名 ,昵稱 ,性別 ,職業(yè) ,駕齡 ,年齡,車輛品牌 ,車款 ,顏色 )。 printf(%8ld,)。 printf(%9s,)。 for(i=0。i++) printf(%7d,[i])。 printf(%7s,)。 } void readNode(Type *pdata) //根據(jù)提示讀入結(jié)點(diǎn)的相關(guān)數(shù)據(jù)域的值 { int i。s information\n)。 scanf(%ld,amp。 printf(name: )。pdataname)。 scanf(%s,amp。 printf(job: )。pdatajob)。 for(i=0。i++) { scanf(%d,amp。 } printf(brand of the car: )。pdatabrand)。 scanf(%s,amp。 printf(colour of the car: )。pdatacolour)。 } int equal(Type data1,Type data2,int condition) { if(condition==1)
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1