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

正文內(nèi)容

中南大學c課程設(shè)計(編輯修改稿)

2024-09-03 10:45 本頁面
 

【文章內(nèi)容簡介】 i++) elem[i] = NULL。}List::~List(){ for (int i = 0 。 i n 。 i++) { delete [] elem[i]。 elem[i] = NULL。 } if(elem) delete [] elem。 elem = NULL。}bool List::add(){ if(n capacity) { int num_。 char name_[20]。 int amount_。 double prrice_。 cout請輸入設(shè)備編號:。 cinnum_。 cout請輸入設(shè)備名稱:。 cinname_。 cout請輸入購置臺數(shù):。 cinamount_。 cout請輸入設(shè)備單價:。 cinprrice_。 elem[n] = new Equipment(num_,name_,amount_,prrice_)。 n++。 return true。 } return false。}bool List::find(){ int num_。 cout請輸入您需要查找的設(shè)備編號:。 cinnum_。 for(int i = 0 。 i n 。 i++) { if(num_ == elem[i]getNum()) { cout查找成功!設(shè)備信息如下:endl。 elem[i]output()。 return true。 } } cout查找失??!無此設(shè)備信息。endl。 return false。}void List::modify(){ system(cls)。 if(n 0) { int i,num_。 bool ok = false。 cout現(xiàn)有的設(shè)備編號如下:endl。 for (i = 0 。 i n 。 i++) { coutelem[i]getNum() 。 } coutendl。 cout請輸入您需要修改的設(shè)備編號:。 cinnum_。 for (i = 0 。 i n 。 i++) { if(elem[i]getNum()==num_) { ok = true。 int choice = 1。 do { system(cls)。 elem[i]output()。 cout。endl。 cout請輸入您需要修改的選項:。 cinchoice。 if(choice 1 || choice 8) { cout輸入錯誤,請重新輸入!endl。 choice = 1。 continue。 } switch (choice) { case 1: elem[i]setNum()。 break。 case 2: elem[i]setName()。 break。 case 3: elem[i]setFactory()。 break。 case 4: elem[i]setDate()。 break。 case 5: elem[i]setAmount()。 break。 case 6: elem[i]setPrrice()。 break。 case 7: elem[i]setNotes()。 break。 case 8: break。 } } while (choice != 8)。 } } if(!ok) cout您的輸入有誤!endl。 } else cout現(xiàn)無任何設(shè)備!endl。}bool List::Save(){ ofstream fout。 ()。 (0)。 //清楚txt文檔的數(shù)據(jù) (1,ios::end)。 //在txt文檔中光標退格 if(()) { cout找不到文件,保存失?。ndl。 return false。 } else { for(int i = 0 。 i n 。 i++) { elem[i]foutput(fout)。 } } cout保存成功!endl。 ()。 return true。}bool List::Read(){ int size。 ifstream fin。 ()。 streampos pos = ()。 (0,ios::end)。 size = ()。 (pos)。 if(()) { cout找不到文件,讀取失?。ndl。 return false。 } else { int num_,amount_,y,m,d
點擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1