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

正文內(nèi)容

酒店客房預(yù)訂管理系統(tǒng)(編輯修改稿)

2025-05-06 08:02 本頁面
 

【文章內(nèi)容簡介】 mer::Customer() //構(gòu)造函數(shù){name=。number=1。}Room::Room(){room_number=1。room_level=0。room_config=。20 / 38}CustomerBase::CustomerBase(){next=NULL。}RoomBase::RoomBase(){next=NULL。}InfoBase::InfoBase(){next=NULL。}void pause(){char get。cout請按下任何鍵繼續(xù)……endl。(get)。(get)。}}//info_space 的結(jié)尾endif //INFO_H各功能函數(shù)源代碼:ifndef INFO_FUN_Hdefine INFO_FUN_Hincludeiostreamincludefstreamincludestringincludecstdlibinclude namespace info_space{void readfile(ifstreamamp。 instream,CBasePtramp。 temp) //從文件中讀取客戶數(shù)據(jù){int t_number=1。string t_name=。CBasePtr t_temp=new CustomerBase。21 / 38instreamt_name。while(!()){instreamt_number。t_temp=t_name。t_temp=t_number。if(()) return。t_tempnext=temp。temp=t_temp。t_temp=NULL。t_temp=new CustomerBase。 //循環(huán)創(chuàng)建用戶信息類instreamt_name。}}void writefile(ofstreamamp。 outstream,CBasePtramp。 temp) //信息寫入文件中{if(temp==NULL) return。CBasePtr t_temp=temp。 //為了防止寫完文件后,指針到達(dá)指針尾while(t_temp!=NULL) {if(t_temp==)t_temp=t_tempnext。if(t_temp==NULL) break。 //這兩個 if 語句用來判別輸出客戶信息outstreamt_temp t_tempendl。t_temp=t_tempnext。}}void readfile(ifstreamamp。 instream,RBasePtramp。 temp) //讀取文件函數(shù)的重載{int number=1。int level=0。string config=。RBasePtr t_temp=new RoomBase。instreamnumber。while(!()){22 / 38instreamlevel。instreamconfig。t_temp=number。t_temp=level。t_temp=config。if(()) return。t_tempnext=temp。temp=t_temp。t_temp=NULL。t_temp=new RoomBase。instreamnumber。}}void writefile(ofstreamamp。 outstream,RBasePtramp。 temp){if(temp==NULL) return。RBasePtr t_temp=temp。while(t_temp!=NULL) {if(t_temp==1)t_temp=t_tempnext。if(t_temp==NULL) break。 //這兩個 if 語句用來判別輸出房間信息outstreamt_temp t_temp t_tempendl。t_temp=t_tempnext。}}bool check(CBasePtramp。 temp_ptr,int number)//若找到相同編號則返回 true,否則返回false{CBasePtr the_ptr=temp_ptr。while(the_ptr!=NULL){if(the_ptr==number)return true。else the_ptr=the_ptrnext。}23 / 38return false。}bool check(RBasePtramp。 temp_ptr,int number) //核對預(yù)訂的客戶和客房信息,看是否還有空房{RBasePtr the_ptr=temp_ptr。while(the_ptr!=NULL){if(the_ptr==number)return true。else the_ptr=the_ptrnext。}return false。}void CustomerBase::add(Customer temp) //添加客戶信息{if(==||==1){cout用戶信息未填寫完整,請重新填寫!。return。}else{ifstream instream。ofstream outstream。(E:\\)。CBasePtr temp_ptr=NULL。readfile(instream,temp_ptr)。 //讀取文件中的客戶信息,存入 temp_ptr 中 CBasePtr tt_ptr=temp_ptr。 //用此臨時指針獲取指針尾部指針,從而讓新客戶信息加到指針尾部,寫入的時候也會相應(yīng)寫到文件尾部while(tt_ptrnext!=NULL) tt_ptr=tt_ptrnext。if(check(temp_ptr,)) {cout客戶編號已經(jīng)存在,請核查!endl。return。24 / 38}else{CBasePtr ptr=new CustomerBase。ptrthe_customer=temp。tt_ptrnext=ptr。}(E:\\)。 //open 函數(shù)會刷新文檔,里面存儲的內(nèi)容全失writefile(outstream,temp_ptr)。 //將新的鏈表信息寫入文件中}}void CustomerBase::remove(Customer temp) //刪除客戶信息{int flag=0。 //設(shè)置一個標(biāo)記,用來檢驗(yàn)刪除是否成功ifstream instream。ofstream outstream。(E:\\)。CBasePtr temp_ptr=NULL。readfile(instream,temp_ptr)。 //讀取文件中的客戶信息,存入 temp_ptr 中if(!check(temp_ptr,)) {cout不存在此編號!endl。return。} CBasePtr before=temp_ptr,after=temp_ptr。 //創(chuàng)建一個前指針和后指針,方便刪除對應(yīng)元素 if(before==){temp_ptr=temp_ptrnext。 //如果第一個元素就是要刪除的元素則直接刪除after=NULL。 //元素已經(jīng)刪除,可以直接寫入文件中,設(shè)置 after 為 NULL 跳過while 循環(huán)flag=1。}while(after!=NULL){25 / 38if(after==){beforenext=afternext。flag=1。 //刪除成功,設(shè)置標(biāo)志為 1}else {before=beforenext。after=beforenext。}}//while 循環(huán)結(jié)束if(flag==0) cout不存在此編號!endl。 //刪除失敗else {(E:\\)。writefile(outstream,temp_ptr)。 //將新鏈表寫入文件}}void RoomBase::add(Room temp) //文件中存在的房間信息{if(==1||==0||==){cout房間信息未填寫完整,請重新填寫!。return。}else{ifstream instream。ofstream outstream。(E:\\)。RBasePtr temp_ptr=NULL。readfile(instream,temp_ptr)。 //讀取文件中的房間信息,存入 temp_ptr 中 RBasePtr tt_ptr=temp_ptr。 //用此臨時指針獲取指針尾部指針,從而讓新房間信息加到指針尾部,寫
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1