strcpy(pCu->telephone,Temp[3]); pCu->yingshou=(float)atof(Temp[4]); pCu->shishou=(float)atof(Temp[5]); strcpy(pCu->shouyinyuan,Temp[6]); strcpy(pCu->time,Temp[7]); for(i=0;i int huodekefangkehu(Pfangjian pRF,int num)/*获取一个房间的客户记录*/{ char * szTitles[]={\ int i; Pkehu pCu,pCu2; pRF->Record=(Pkehu)malloc(sizeof(kehu)); for(i=1,pCu=pRF->Record;i<=num&&pCu;i++){ printf(\ huodekehuxinxi(pCu); strcpy(pCu->room,pRF->num); getch(); pCu->next=(Pkehu)malloc(sizeof(kehu)); pCu2=pCu; pCu=pCu->next; } free(pCu); pCu2->next=NULL; return 0; } #define GR_TITLES 3 int huodekefangxinxi(Pfangjian pRF) { int i; char *Temp[GR_TITLES]; char * szRooms[]={\ \ \ 26 for(i=0;i int huodenkefang(Pfangjianzhonglei sub_tree,int num_room){ int i; const char * szTitles[]={\ char buffer[BUFSIZE]; Pfangjian pRF,pRF2; sub_tree->first=(Pfangjian)malloc(sizeof(fangjian)); for(i=1,pRF=sub_tree->first;i<=num_room;i++){ sprintf(buffer,\ printf(\ getch(); huodekefangxinxi(pRF); pRF->zhonglei=sub_tree->zhonglei; pRF->next=(Pfangjian)malloc(sizeof(fangjian)); pRF2=pRF; pRF=pRF->next; } free(pRF); pRF2->next=NULL; return 0; } #define MCF_TITLES 8 int xiugaikehuxinxi(Pkehu pCu) { int i; const char * szTitles[]={\ char * Temp[MCF_TITLES]; char * szCustom[]={ 27 \ \ \ \ \ \ \ \ for(i=0;i #define MRF_TITLES 3 int xiugaikefangxinxi(Pfangjian pRF) { 28 int i; char * Temp[MRF_TITLES]; Pkehu pCu,pCu2; char * szRooms[]={\ \ \ for(i=0;i Temp[i][0]='\\0'; } zhanxiankefang(pRF); Get_Info(szRooms,Temp,MRF_TITLES); strcpy(pRF->num,Temp[0]); pRF->times=atoi(Temp[1]); pRF->jiage=(float)atof(Temp[2]); for(i=0,pCu2=pCu=pRF->Record;i if(!pCu){/*增加顾客数量*/ pCu2->next=(Pkehu)malloc(sizeof(kehu)); pCu=pCu2->next; pCu->next=NULL; huodekehuxinxi(pCu); } else xiugaikehuxinxi(pCu); } pCu->next=NULL; for(i=0;i int zhanxiankehu(Pkehu pCu) { const char * szTitles[]={ \ \ \ \ \ \ \ \ \ }; clrscr(); 29 printf(\ printf(\ printf(\ printf(\ printf(\ printf(\ printf(\ printf(\ printf(\ return 0; } int zhanxiankefang(Pfangjian pRF) { const char * szTitles[]={ \ \ \ \ }; clrscr(); printf(\ printf(\ printf(\ printf(\ return 0; } int ShowTree(Pfangjianzhonglei pRST) { const char * szTitles[]={ \ \ }; clrscr(); printf(\ printf(\ return 0; } int Display(void) { int i; 30