【正文】
C不是最好,我們?cè)囍鴮⑺龅母谩O胂笾匾?,?dòng)手更重要。通過(guò)實(shí)習(xí),我們還明白了一些做人的道理。鏈表、文件的定位、以及真正的vc操作技術(shù)。得到了好多以后可以避免錯(cuò)誤的經(jīng)驗(yàn)。在實(shí)習(xí)中遇到了好多的調(diào)試不出結(jié)果的問(wèn)題。雖然最后的一個(gè)模塊是通過(guò)網(wǎng)絡(luò)找到的,但是也通過(guò)此個(gè)模塊學(xué)到了一些在課堂上沒(méi)有真正掌握的文件部分的自如運(yùn)用。}五.上機(jī)操作編譯出一個(gè)程序,需要上機(jī)運(yùn)行檢驗(yàn)程序是否正確,此外在上機(jī)過(guò)程中你可以思考一下該程序還有沒(méi)有其他的實(shí)現(xiàn)方案或者那些事可以更好的改進(jì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)一個(gè)任務(wù)結(jié)束時(shí)的選擇瀏覽還是返回的函數(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()[說(shuō)明]:該函數(shù)可以用來(lái)加載所有記錄,并且可以返回所有記錄的個(gè)數(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í)行項(xiàng)*********/{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