【正文】
C不是最好,我們試著將它做的更好。想象重要,動手更重要。通過實習,我們還明白了一些做人的道理。鏈表、文件的定位、以及真正的vc操作技術(shù)。得到了好多以后可以避免錯誤的經(jīng)驗。在實習中遇到了好多的調(diào)試不出結(jié)果的問題。雖然最后的一個模塊是通過網(wǎng)絡找到的,但是也通過此個模塊學到了一些在課堂上沒有真正掌握的文件部分的自如運用。}五.上機操作編譯出一個程序,需要上機運行檢驗程序是否正確,此外在上機過程中你可以思考一下該程序還有沒有其他的實現(xiàn)方案或者那些事可以更好的改進的。}while(w1==2)。w1)。printf(\nAre you sure?\n\n\t1).sure 2).no and remodify 3).back without save in this time [ ]\b\b)。}puts(\nNow:\n)。case 3:menu()。scanf(%s,staff[i].name)。break。}}while(c3||c1)。if(c3||c1){puts(\nChoice error!please again!)。scanf(%d,amp。do{puts(\nmodify by=\n\n 1).number 2).name 3).cancel and back)。}(4)修改整條數(shù)據(jù)記錄函數(shù)modify_data(int i,int n)void printf_face()。if(w==1)browse()。scanf(%d,amp。printf(\n\n\tSuccessful^^.\n\n)。}(3)一個任務結(jié)束時的選擇瀏覽還是返回的函數(shù)printf_back()void printf_back(){int k,w。 r=i。room[i].client_list[j].date)。room[i].client_list[j].year,amp。room[i].client_list[j].sex,amp。room[i].price,amp。j++) fscanf(fp,%d,%s,%d,%d,%s,%d,%d,%s,%d,%d,%d,amp。i++) for(j=0。 } for(i=0。if((fp=fopen(,r))==NULL) {printf(\nCannot open file\n)。struct hotel room[N]。}(2)加載函數(shù) load_room()[說明]:該函數(shù)可以用來加載所有記錄,并且可以返回所有記錄的個數(shù)。fclose(fp)。jp。ir。 return NULL。int i,j。 case 2:menu()。switch(l) {case 1:modify_day()。scanf(%d,amp。puts(What you want to do?\n)。modify_s(m,n)。if(w==1) printf_p(m,n)。amp。amp。jr。ip。load_room()。scanf(%d,amp。b)。puts(\nMonth:)。scanf(%d,amp。puts(\t\tPlease input the date)。 case 11:modify()。room[i].price=a。scanf(%d,amp。break。scanf(%s,b)。break。a)。 case 8:printf(Please input the new room_ID\n)。room[i].client_list[j].date=a。scanf(%d,amp。break。a)。 case 6:printf(Please input the new month\n)。room[i].client_list[j].year=a。scanf(%d,amp。break。scanf(%s,s)。break。a)。 case 3:printf(Please input the new age\n)。room[i].client_list[j].sex=a。scanf(%d,amp。break。scanf(%s,s)。q)。printf(Please choice your number(110):[ ]\b\b)。printf(\nChoice the title you want to modify\n)。 }}void modify_s(int i,int j) /*********修改執(zhí)行項*********/{int a,q。break。l)。puts(1).Modify again\t2).back\n)。 save()。 else printf(\nThere is no record here\n)。j++) if(strcmp(room[i].client_list[j].name,s)==0) w=1,m=i,n=j。i++) for(j=0。for(i=0。scanf(%s,s)。char s[20]。 case 3:menu()。 case 2:modify_day()。 switch(n){case 1:modify_one()。 }else m=0。n3) {m=1。if(n1amp。scanf(%d,amp。puts(\t\t**************************************************\n)。puts(\t\t\t\t2).modify one day\n)。do{puts(\t\t*********************MENU************************\n)。 }}(4)修改模塊[需求分析] 該模塊的功能是插入客戶記錄信息并且不能覆蓋原有客戶信息。break。l)。puts(1).search again\t2).back\n)。if(w==0)printf(NO record this day\n)。amp。amp。jr。ip。load_room()。 scanf(%d,amp。b)。printf(\nMonth:)。 scanf(%d,amp。printf(\nPlease input the day you want to search)。case 2:search()。switch(l){case 1:search_one()。scanf(%d,amp。 puts(What do you want to do?\n)。if(w==1)printf_p(m,n)。jp。ir。load_room()