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

正文內(nèi)容

c客戶電話本管理系統(tǒng)的課程設(shè)計(jì)報(bào)告(編輯修改稿)

2025-06-19 18:04 本頁面
 

【文章內(nèi)容簡介】 附錄Ⅱ程序代碼include iomanipinclude iostreaminclude fstreaminclude include include stringdefine NULL 0int const N=20。define LEN sizeof(struct student)using namespace std。 void Menu()。 void Pass()。int n=0。 //——定義一個(gè)客戶信息的結(jié)構(gòu)體struct student{ char name[N]。 //用來存放姓名char sex[N]。 //用來存放性別long id。 //用來存放編號char dianhua[N]。 //用來存放電話char dizhi[N]。struct student *next。}。class Information{ public:student *creat()。 //建立客戶信息void output(student *head)。 //顯示客戶信息student *insert(student*head)。 //指針函數(shù)*insert()用來添加客戶信息.student *cancel(student *head,long id)。 //指針函數(shù)*cancel()用來刪除客戶信息.private:student *p1,*p2,*p3,*head。 }。student *Information::creat(void) //創(chuàng)建{ system(cls)。 //系統(tǒng)清屏 char ch[N]。n=0。 //用來存放客戶姓名 p1=p2=(student *)malloc(LEN)。//調(diào)用malloc()函數(shù)用來開辟一個(gè)新的存儲單元 cout 請建立客戶信息表,在姓名處鍵以 結(jié)束輸入!endl。cout 姓名:。cinch。head=NULL。 //給指針head賦初值while (strcmp(ch,)!=0) { //調(diào)用字符比較函數(shù)strcmp()用來判斷是否繼續(xù)輸入p1=(student *)malloc(LEN)。 //調(diào)用malloc()函數(shù)用來開辟一個(gè)新的存儲單元strcpy(p1name,ch)。 //將循環(huán)結(jié)構(gòu)前面輸入的姓名復(fù)制到結(jié)構(gòu)體名為p1的數(shù)組name中cout 性別:。cinp1sex。cout 編號:。cinp1id。cout 電話號碼:。cinp1dianhua。cout 地址:。cinp1dizhi。if(n==0)head=p1。 //如果是輸入第一組客戶信息就將指針p1賦給指針headelse p2next=p1。 //否則將p1賦給p2所指結(jié)構(gòu)體的next指針p2=p1。 //將指針p1賦給指針p2n++。cout\n 姓名:。cinch。 //將輸入的姓名存放到字符數(shù)組ch中}p2next=NULL。 //將p2所指結(jié)構(gòu)體的next指針重新賦空值return (head)。//將輸入的第一組客戶信息返回}//定義output()函數(shù)將客戶信息從頭指針?biāo)竷?nèi)容開始輸出void Information::output(student *head) {system(cls)。if(head==NULL) cout 這是一個(gè)空表,請先輸入客戶信息!\n。else{cout\t\t\t *客戶通訊表*\n。cout\n 編號\t姓名\t性別\t電話\t地址\n。cout\n。 p1=head。 //將頭指針賦給p do{coutp1id\tp1name\tp1sex\tp1dianhua\tp1dizhiendl。cout\n。 p1=p1next。 //將下一組客戶信息的next指針賦給p}while(p1!=NULL)。 //若指針p非空則繼續(xù),目的是把所有的客戶信息都傳給指針p然后輸出.}system(PAUSE)。 //系統(tǒng)暫停}//刪除客戶信息student *Information::cancel(student *head,long id) //定義一個(gè)指向struct student的結(jié)構(gòu)體指針函數(shù)*delete()用來刪除客戶信息.{ system
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1