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

正文內(nèi)容

面向?qū)ο骳課程設(shè)計(jì)(編輯修改稿)

2024-07-13 13:11 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 取文件指針的位置 { StudentNode *p=new StudentNode。// 臨時(shí)中轉(zhuǎn)站 ( reinterpret_castchar *(p) , sizeof(*p) )。 if(thishead==NULL)//錯(cuò)誤 :rear==NULL { thishead=new StudentNode(*p)。//錯(cuò)誤: rear=new StudentNode(*p)。 rear=thishead。//沒(méi)有此句 錯(cuò)誤 } else { while( reargetNext()!=NULL ) { rear=reargetNext()。 } rearsetNext(new StudentNode(*p))。//調(diào)用復(fù)制構(gòu)造函數(shù) } } ()。 } //增加記錄到鏈表尾 void StudentLinklist::addAtEnd(string name,string sex,string major,string birthday,string 福建工程學(xué)院 信息學(xué)院 面向?qū)ο笳n程設(shè)計(jì)(題目范例) 12 address,float EnScore) { ofstream fileIn。 StudentNode *rear=thishead。 StudentNode *p。 ( .txt, ios_base::app)。 if(thishead==NULL) { p=new StudentNode(name,sex,major,birthday,address,EnScore)。 thishead=p。 (reinterpret_castchar *(p),sizeof(*p))。 } else { while(reargetNext()!=NULL) { rear=reargetNext()。 } p=new StudentNode(name,sex,major,birthday,address,EnScore)。 rearsetNext(p)。 (reinterpret_castchar *(p),sizeof(*p))。 } ()。 } //鏈接到鏈表尾 void StudentLinklist::addAtEnd(StudentNode *p) { StudentNode *pn=thishead。 if(thishead=NULL) { thishead=p。 } else { while(pngetNext()!=NULL) { pn=pngetNext()。 } pnsetNext(p)。 } } //顯示所有學(xué)生信息 void StudentLinklist::visitAllNode() { 福建工程學(xué)院 信息學(xué)院 面向?qū)ο笳n程設(shè)計(jì)(題目范例) 13 StudentNode *p。 p=thishead。 if(p==NULL) { cout沒(méi)有學(xué)生記錄! endl。 } else { cout\t\t\t\t學(xué)生情況 endl。 coutendl。 coutsetiosflags(ios::left)。 coutsetw(5)編號(hào) setw(10)學(xué)生姓名 setw(5)性別 setw(10)生日 setw(15)專業(yè) setw(10)外語(yǔ)成績(jī) setw(20)地址 endl。 cout━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━ endl。 while(pgetNext()!=NULL) { pvisitStudentNode()。 p=pgetNext()。 } pvisitStudentNode()。 cout━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ endl。 coutendl。 } } //刪除學(xué)生記錄 void StudentLinklist::deleteStuNode() { string name。 StudentNode* p=thishead。 StudentNode* follow=p。 if(thishead!=NULL) { cout請(qǐng)輸入要?jiǎng)h除學(xué)生的姓名: 。 cinname。 } else { cout沒(méi)學(xué)生可以刪除! endl。 return。 } 福建工程學(xué)院 信息學(xué)院 面向?qū)ο笳n程設(shè)計(jì)(題目范例) 14 if(pgetName()==name)//若刪除的結(jié)點(diǎn)為第一個(gè)結(jié)點(diǎn) { head=pgetNext()。 delete p。 } else { while(pgetNext()!=NULLamp。amp。pgetName()!=name) { follow=p。//follow一直指向 p的前一個(gè)結(jié)點(diǎn) p=pgetNext()。 } if(pgetName()==name) { followsetNext(pgetNext())。 delete p。 } } } //搜索學(xué)生信息 void StudentLinklist::searchStuNode() { string name。 StudentNode* p=thishead。 int flag=0。 if(thishead!=NULL) { cout請(qǐng)輸入學(xué)生姓名關(guān)鍵字 :endl。 cinname。 } else { cout學(xué)生記錄為空,沒(méi)有可搜索的學(xué)生。 endl。 return。 } while(p!=NULL) { if((pgetName()).find(name,0)!=string::npos)//string::nops=1 { flag++。 if(flag==1) { 福建工程學(xué)院 信息學(xué)院 面向?qū)ο笳n程設(shè)計(jì)(題目范例) 15 cout姓名關(guān)鍵字為 :name的學(xué)生信息為: endl。 coutendl。 coutsetw(5) 編號(hào) setw(10) 學(xué)生姓名 setw(5) 性別setw(10)生日 setw(15)專業(yè) setw(10)外語(yǔ)成績(jī) setw(20)地址endl。 cout━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━ endl。 } pvisitStudentNode()。 p=pgetNext()。 } else p=pgetNext()。 } if(flag) cout━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ endl。 else cout沒(méi)有名為: name的學(xué)生。 endl。 } //統(tǒng)計(jì)學(xué)生總?cè)藬?shù) void StudentLinklist::showStuNode(StudentLinklist *sl) { cout學(xué)生總?cè)藬?shù)為: 。 StudentNode::getCount()。//靜態(tài)成員函數(shù)調(diào)用 顯示人數(shù) coutendl。 while(true) { cout\t\t┏━━━━━━━━━━━━━━━━━━━━━┓ endl。 cout\t\t┃ 學(xué)生信息統(tǒng)計(jì) ┃ endl。 cout\t\t┣━━━━━━━━━━━━━━━━━━ ━━━┫ endl。 cout\t\t┃ 1 = 按專業(yè)統(tǒng)計(jì) ┃ endl。 cout\t\t┃ 2 = 按性別統(tǒng)計(jì) ┃ endl。 cout\t\t┃ 3 = 按年齡統(tǒng)計(jì) ┃ endl。 cout\t\t┃ 0 = 退出統(tǒng)計(jì) ┃ endl。 cout\t\t┗━━━━━━━━━━━━━━━━━━━━━┛ endl。 int choice。 cout請(qǐng)輸入選擇: 。 cinchoice。 switch(choice) { case 0: slshowMajor()。 福建工程學(xué)院 信息學(xué)院 面向?qū)ο笳n程設(shè)計(jì)(題目范例) 16 break。 case 1: slshowSex()。 break。 case 2: system(cls)。 slshowSex()。 break。 case 3: system(cls)。 slshowAge()。 break。 default: cout輸入錯(cuò)誤,請(qǐng)從新輸入 endl。 } if(choice==0) break。 } } //按年齡統(tǒng)計(jì) void StudentLinklist::showAge() { StudentNode *follow=thishead。 string BornYear。 int bornyear。 CTime currentTime = CTime::GetCurrentTime()。//類 CTime的對(duì)象 currentTime獲取當(dāng)前時(shí)間 int year = ()。//獲取當(dāng)前年份 int flag=0。 if(follow==NULL) { cout沒(méi)有學(xué)生統(tǒng)計(jì)個(gè)屁! endl。 } else { while(follow!=NULL) { ( followgetBirthday(),0,4 )。//提取 出生日期 的前 四個(gè)字符(年份) bornyear=atoi( const_castchar*(()))。//將 string 類年份轉(zhuǎn)換為字符串型再轉(zhuǎn)為
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1