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

正文內(nèi)容

c汽車租賃管理系統(tǒng)(編輯修改稿)

2024-10-10 23:33 本頁面
 

【文章內(nèi)容簡介】 //歸還操作 void print() { cout 汽車原編號: setw(6) no \t 汽車原名稱 : setw(18) name \t setw(10) (onshelf==1? 在車庫 :已租 ) endl。 } //輸出汽車 void disp() { cout setw(6) no setw(18) name setw(10) (onshelf==1? 在車庫 :已租 ) endl。 } //顯示 void disp(int k) { cout編號為 noendl。 } }。 templateclass T class biaozhiq { public: T abaso。 }。 //汽車庫類,實現(xiàn)對汽車的管理,查找,刪除等 class CarDatabase { public: int top。 //汽車記錄指針 Car che[Maxc]。 //汽車記錄 CarDatabase() { Car b。 top=1。 fstream file(,ios::in)。 while (1) { ((char *)amp。b,sizeof(b))。 if (!file) break。 top++。 che[top]=b。 } ()。 } //構(gòu)造函數(shù),將 che[]中 void clear()//全刪 { top=1。 } int addcar(int n,char *na)。 //增加汽車 Car *query(int carid) { for (int i=0。i=top。i++) if (che[i].getno()==carid amp。amp。che[i].gettag()==0) { return amp。che[i]。 } return NULL。 } //查找汽車 void cardata()。 //汽車庫管理 virtual void print(int n) { for(int i=0。i=top。i++) if(che[i].getno()==n) che[i].print()。 } //輸出原汽車 void disp() { for (int i=0。i=top。i++) if (che[i].gettag()==0) che[i].disp()。 } //顯示 ~CarDatabase()。 //析構(gòu)函數(shù),將 che[]寫到 文件中 }。 int CarDatabase::addcar(int n,char *na) { Car *p=query(n)。 if (NULL==p) { top++。 che[top].addcar(n,na)。 return 1。 } return 0。 } //增加汽車 CarDatabase::~CarDatabase() { fstream file(,ios::out)。 for (int i=0。i=top。i++) if (che[i].gettag()==0) ((char *)amp。che[i],sizeof(che[i]))。 ()。 ofstream f(c:\\)。 for (int j=0。j=top。j++) { if(che[j].gettag()==0) f編號 。 fche[j].no。 f\t\t\t。 f汽車 。 fche[j].name。 f\t\t\t。 if(che[j].onshelf==1) f在車庫 endl。 else f已出租 endl。 } } //析構(gòu)函數(shù),將 che[]寫到 文件中 //汽車管理 void CarDatabase::cardata() { char choice。 char ame[20]。 int carid。 Car *b。 do { cout \n\n\n\t\t\t歡迎進入汽車管理界面 endlendl。 cout\t\tendl。 cout\t\t| 1 增加汽車 |endl。 cout\t\t| 2 更改汽車 |endl。 cout\t\t| 3 刪除汽車 |endl。 cout\t\t| 4 查找汽車 |endl。 cout\t\t| 5 查看全部 |endl。 cout\t\t| 6 刪除全部 |endl。 cout\t\t| 0 返回上一層 |endl。 cout\t\tendl。 cin choice。 switch (choice) { case 39。139。: cout 新增 \n 輸入汽車編號 :endl。 cin carid。 try { if(carid=0)throw 1。 } catch(...) { cout輸入有誤,請重新 輸入 。 break。 } cout 輸入汽車名稱 :endl。 cin ame。 addcar(carid,ame)。 break。 case 39。239。: cout 更改 \n 輸入汽車編號 :endl。 cin carid。 try { if(carid=0)throw 1。 } catch(...) { cout輸入有誤,請重新輸入 。 break。 } b=query(carid)。 if (b==NULL) { cout 該汽車不存在 。 coutendl。 break。 } print(carid)。 cout 輸入新的汽車編號 :。 coutendl。 cincarid。 try { if(carid=0)throw 1。 } catch(...) { cout輸入有誤,請重新輸入 。 break。 } cout 輸入新的汽車名稱 :endl。 cin ame。 baddcar(carid,ame)。 cout修改成功 !endl。 break。 case 39。339。: cout 刪除 \n 讀入汽車編號 :endl。 cin carid。 try { if(carid=0)throw 1。 } catch(...) { cout輸入有誤,請重新輸入 。 break。 } b=quer
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1