資源簡介
旅館有多種不同標準的房間,有標準價和優惠價,旅客入住時開始登記,離店時結算房價(含食品消耗費、通話費及損壞賠償費等),該系統還具有完善的統計分析功能

代碼片段和文件信息
#include“linkNode.h“
extern?Time?time0;//系統時間?
extern?int?income;//酒店總收入? ??
extern?Room?*?president0*?president1*?luxury0*?luxury1*?standard0*?standard1*?single0*?single1;
extern?HEGG?eggbackgroundeggbai1[50]egghong1[50]eggbuttonbai[7]eggbuttonhong[7];
void??backupsfile()//系統備份
{
FILE?*?fp;
if((fp=fopen(“系統備份文件.txt““w+“))==NULL)
printf(“系統備份文件打開失敗“);
else
????{//先把時間和總收入寫入文件?
??fprintf(fp“%d?%d?%d?%d?%d?%lld?%d?“time0.yeartime0.monthtime0.daytime0.hourtime0.mintime0.countincome);
??single0=single0->nextp;//頭結點為空
??????while(single0!=NULL){//把單人間空閑節點寫入文件
???????fprintf(fp“%d?%d?%d?“single0->numbersingle0->statesingle0->price);
???????//??if(single0->nextp!=NULL)?
???????single0=single0->nextp;
???????????}
??
??single1=single1->nextp;//頭結點為空?
??while(single1!=NULL){//把單人間入住節點寫入文件?
???????fprintf(fp“%d?%d?%s?%s?%s?%s?%s?%d?%d?%d?%d?%d?%lld?%d?“single1->numbersingle1->statesingle1->people.name
??????single1->people.sexsingle1->people.telsingle1->people.IDsingle1->people.citysingle1->year
??????single1->monthsingle1->daysingle1->hoursingle1->minsingle1->countsingle1->price);
???????single1=single1->nextp;
??}
??
??standard0=standard0->nextp;//頭結點為空
??while(standard0!=NULL){//把標準間空閑節點寫入文件?
???????fprintf(fp“%d?%d?%d?“standard0->numberstandard0->statestandard0->price);
???????standard0=standard0->nextp;
??}
??
??standard1=standard1->nextp;//頭結點為空
??while(standard1!=NULL){//把標準間入住節點寫入文件?
???????fprintf(fp“%d?%d?%s?%s?%s?%s?%s?%d?%d?%d?%d?%d?%lld?%d?“standard1->numberstandard1->statestandard1->people.name
??????standard1->people.sexstandard1->people.telstandard1->people.IDstandard1->people.citystandard1->year
??????standard1->monthstandard1->daystandard1->hourstandard1->minstandard1->countstandard1->price);
???????????standard1=standard1->nextp;
??}
??
??luxury0=luxury0->nextp;//頭結點為空
??while(luxury0!=NULL){//把豪華間空閑節點寫入文件?
???????fprintf(fp“%d?%d?%d?“luxury0->numberluxury0->stateluxury0->price);
???????luxury0=luxury0->nextp;
??}
??
??luxury1=luxury1->nextp;//頭結點為空
??while(luxury1!=NULL){//把豪華間入住節點寫入文件?
???????????fprintf(fp“%d?%d?%s?%s?%s?%s?%s?%d?%d?%d?%d?%d?%lld?%d?“luxury1->numberluxury1->stateluxury1->people.name
??????luxury1->people.sexluxury1->people.telluxury1->people.IDluxury1->people.cityluxury1->year
??????????luxury1->monthluxury1->dayluxury1->hourluxury1->minluxury1->countluxury1->price);
???????luxury1=luxury1->nextp;
??}
??
??president0=president0->nextp;//頭結點為空
??while(president0!=NULL){//把總統間空閑節點寫入文件?
???????fprintf(fp“%d?%d?%d?“president0->numberpresident0->statepresident0->price);
???????president0=president0->nextp;
??}
??
??president1=president1->nextp;//頭結點為空
??while(president1!=NULL){//把總統間入住節點寫入文件?
???????fprintf(fp“%d?%d?%s?%s?%s?%s?%s?%d?%d?%d?%d?%d?%lld?%d?“president1->numberpresident1->statepresident1->people.name
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3510??2015-06-03?18:03??程序及源代碼\backupsfile.cpp
?????文件?????723248??2015-06-03?18:03??程序及源代碼\backupsfile.o
?????文件???????6339??2015-06-03?18:03??程序及源代碼\cheakin.cpp
?????文件?????724973??2015-06-03?18:03??程序及源代碼\cheakin.o
?????文件???????9655??2015-06-03?18:03??程序及源代碼\cheakout.cpp
?????文件?????727368??2015-06-03?18:03??程序及源代碼\cheakout.o
?????文件??????12230??2015-06-03?18:03??程序及源代碼\Drawmap.cpp
?????文件?????739068??2015-06-03?18:03??程序及源代碼\Drawmap.o
?????文件??????15433??2007-03-16?13:38??程序及源代碼\egg.h
?????文件????????905??2015-05-31?17:40??程序及源代碼\getinput.c
?????文件???????2098??2015-06-03?18:06??程序及源代碼\getinput.cpp
?????文件?????721230??2015-06-03?18:06??程序及源代碼\getinput.o
?????文件???????2887??2015-05-31?17:40??程序及源代碼\getmouseinput.c
?????文件???????3291??2015-06-03?18:03??程序及源代碼\getMouseinput.cpp
?????文件?????721825??2015-06-03?18:03??程序及源代碼\getMouseinput.o
?????文件????1474876??2013-04-24?23:47??程序及源代碼\libegg22.a
?????文件???????1385??2015-06-03?18:06??程序及源代碼\li
?????文件???????6346??2015-06-03?18:06??程序及源代碼\main.cpp
?????文件?????724448??2015-06-03?18:06??程序及源代碼\main.o
?????文件???????1980??2015-06-03?18:13??程序及源代碼\Makefile.win
?????文件?????????77??2015-05-31?17:40??程序及源代碼\manage.c
?????文件???????7285??2015-06-03?18:03??程序及源代碼\manage.cpp
?????文件?????724390??2015-06-03?18:03??程序及源代碼\manage.o
?????文件??????????0??2015-06-03?18:10??程序及源代碼\record.txt
?????文件???????6676??2015-06-03?18:03??程序及源代碼\search.cpp
?????文件?????724894??2015-06-03?18:03??程序及源代碼\search.o
?????文件???????7942??2015-06-03?18:03??程序及源代碼\Systemreduction.cpp
?????文件?????725210??2015-06-03?18:03??程序及源代碼\Systemreduction.o
?????文件???????1720??2015-06-03?18:03??程序及源代碼\times.cpp
?????文件?????720675??2015-06-03?18:03??程序及源代碼\times.o
............此處省略129個文件信息
評論
共有 條評論