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

正文內(nèi)容

c項(xiàng)目學(xué)生成績(jī)管理系統(tǒng)(編輯修改稿)

2025-02-26 03:50 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 } Class::~Class() { delete [] cp。 //釋放班級(jí)數(shù)組空間 } void Class::Save() { ofstream outfile()。 if(!outfile) cerr錯(cuò)誤:數(shù)據(jù)文件不能打開(kāi) !\n。 else { outfilenumendl。 //將班級(jí)人數(shù)寫(xiě)入文件 for(int i=1。 i=num。 i++) //將學(xué)生數(shù)據(jù)寫(xiě) 入文件 ,每項(xiàng)數(shù)據(jù)用空格隔開(kāi),方便讀取。 { outfilecp[i].id39。 39。cp[i].name39。 39。 outfilecp[i].english39。 39。cp[i].math39。 39。cp[i].cppendl。 } flag=false。 //設(shè)置數(shù)據(jù)沒(méi)改動(dòng) cout保存成功! endl。 } } void Class::SetScore() //錄入學(xué)號(hào)為 n 的學(xué)生的成績(jī) { int sno。 cout請(qǐng)輸入需錄入成績(jī)的學(xué)生的學(xué)號(hào): 。 cinsno。 int n=Search(sno)。 if(n==0) cout沒(méi)有學(xué)號(hào)為 sno的學(xué)生! endl。 else { cout請(qǐng)輸入學(xué)號(hào)為 sno的學(xué)生的成績(jī): endl。 coutenglish: 。 cincp[n].english。 coutmath: 。 cincp[n].math。 coutC++: 。 cincp[n].cpp。 flag=true。 //數(shù)據(jù)已經(jīng)改動(dòng) } } void Class::Add() //添加一個(gè)學(xué)生的信息 { int sno=0。 if(num=MAXSIZE1) { cout班級(jí)空間已滿(mǎn),添加失??! 。 } else { cout請(qǐng)輸入學(xué)生的信息: endl。 cout學(xué)號(hào): 。 cinsno。 if(Search(sno)!=0) { cout學(xué)號(hào)為 sno的學(xué)生已存在 。 return。 } cp[num+1].id=sno。 cout姓名: 。 cincp[num+1].name。 cp[num+1].english=0。 cp[num+1].math=0。 cp[num+1].cpp=0。 num++。 flag=true。 } } int Class::Search(int n) { for(int i=1。 i=num。 i++) if(cp[i].id==n) return i。 //返回找到的學(xué)生的索 引號(hào)(數(shù)組下標(biāo)) return 0。 //沒(méi)找到,返回 0, } void Class::PrintHead() //輸出表頭,以下用到 setw 語(yǔ)句,所以要注意加頭文件 iomanip { coutsetw(6)學(xué)號(hào) setw(10)姓名 。 coutsetw(10)英語(yǔ) setw(10)數(shù)學(xué) setw(10)C++setw(10)總成績(jī) endl。 } void Class::PrintInfo(int n) //輸出索引號(hào)為 n 的學(xué)生的信息 { coutsetw(6)cp[n].id setw(10)cp[n].name。 coutsetw(10)cp[n].english setw(10)cp[n].mathsetw(10)cp[n].cppsetw(10)cp[n].total()endl。 } void Class::Find() //查找并顯示學(xué)生的信息 { int sno。 cout請(qǐng)輸入要查找的學(xué)生的學(xué)號(hào): 。 cinsno。 int n=Search(sno)。 //查找學(xué)號(hào)為 n 的學(xué)生,返回其索引號(hào)(數(shù)組下標(biāo)) if(n==0) cout查無(wú)此人! endl。 else { PrintHead()。 //輸出表頭 PrintInfo(n)。 //輸出索引號(hào)為 n 的學(xué)生的信息 } } void Class::Delete() //刪除學(xué)號(hào)為 n 的學(xué)生數(shù)據(jù) { if(num==0) cout無(wú)學(xué)生! endl。 else { int sno,n=0。 cout請(qǐng)輸入要?jiǎng)h除的學(xué)生的學(xué)號(hào): 。 cinsno。 n=Search(sno)。 //查找學(xué)號(hào)為 n 的學(xué)生的索引號(hào)(在數(shù)組中的下標(biāo)) if(n==0) //Sear
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1