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

正文內(nèi)容

c課程設(shè)計(jì)電話簿管理-免費(fèi)閱讀

  

【正文】 // 循環(huán)至 end_loop 標(biāo)記為真 . ()。\n39。 // 若文件未讀取完,繼續(xù)取得其他數(shù)據(jù) if((strcmp(new_rec_ptrlast_name, ) != 0) amp。 ifstream infile。 outfilenDayendl。 } // 寫(xiě)入鏈表數(shù)據(jù)到文件 void friend_node::write_list_to_file() { ofstream outfile。 is。 coutcurrent_ptrphone_numendl。 break。 strcpy(current_ptrfirst_name, first_name1)。)。 cout\ :。 // 刪除 current node 指針指向的節(jié)點(diǎn) . current_ptr = temp_ptr。 // 使被刪除節(jié)點(diǎn)前的那 個(gè)節(jié)點(diǎn)成為新的鏈尾 current_ptr = head_ptr。 } else { if(current_ptrnext == NULL) // 若將要?jiǎng)h除的節(jié)點(diǎn)是鏈尾節(jié)點(diǎn) { // 同樣調(diào)用專(zhuān)門(mén)的函數(shù)處理這種特殊情況 delete_end_of_list(previous_ptr)。 cin YesNo。 default: cout 按 Enter 退出 。 goto help。 (pause)。 cout \n 若被重命 名后再寫(xiě)入文件,則原記錄丟失 \n。 cout 1: 我的記錄將有何變化 \n。 if(verify_delete()) // 詢(xún)問(wèn)用戶(hù)是否確認(rèn)刪除 { // 若是 delete_node(previous_ptr)。amp。 previous_ptr = NULL。 } current_ptr=temp_ptr。 cout \n。 (first_name_string,20)。\n39。 cout 按回車(chē)鍵繼續(xù) \n。 (ios::right)。 (last_name_string,20)。 } else // 若鏈表為空 ,顯示此信息 { cout \n 沒(méi)有記錄可顯示 \n。 current_ptr = current_ptrnext。 // 首先清空 fullname strcat(fullname, current_ptrlast_name)。 cin n。 // 調(diào)用 move_current_to_end()函數(shù)使 current_ptr指向鏈表尾 current_ptrnext = new_rec_ptr。//返回一個(gè)地址 } // 使被 new_rec_ptr 所指的節(jié)點(diǎn)成為鏈?zhǔn)椎暮瘮?shù) // 用來(lái)處理插入時(shí)的一類(lèi)特殊情況 . void friend_node::make_node_new_head(friend_node *new_rec_ptr) { friend_node *temp_ptr。 while((tempint 0) amp。 } } } } friend_node *friend_node::position_insertion_point(char lastname[20])// 對(duì)應(yīng)后面的實(shí)參為new_rec_ptrlast_name { // 根據(jù) 姓氏,返回其在鏈表中的正確位置。 // 作為新的鏈?zhǔn)? } else // 否則,再繼續(xù)看應(yīng)插在何位置 { current_ptr = position_insertion_point(new_rec_ptrlast_name)。 } else // 若在分配內(nèi)存中出錯(cuò) ,顯示警告信息并不要?jiǎng)?chuàng)建節(jié)點(diǎn) { cout 警告 : 分配內(nèi)存出錯(cuò) !新節(jié)點(diǎn)不能建立 !\n。//插入新結(jié)點(diǎn) time_t timedata=time(0)。\n39。//清空緩沖區(qū), 碰到字符串結(jié)束符就結(jié)束,從而接受新的字符 //以下程序中出現(xiàn)這一語(yǔ)句表同一意思 cout 姓 : 。 default : // 任何其他的選擇都將顯示出錯(cuò)信息 cout 無(wú)效的選擇 !\n。//修改記錄 break。 // 往鏈表中增加記錄 break。 cout 6 幫助 \n\n。 head_ptr = NULL。 //主函數(shù) void friend_node::wele() { coutendlendlendlendlendlendlendlendlendlendl。 operator(istreamamp。//刪除鏈表 void friend_node::jqsearch_by_name()。//使當(dāng)前指針指向鏈尾 void display_list()。 char pause。我意識(shí)到,我們不應(yīng)是為了編程而編程,而是為了解決問(wèn)題而編程。但是,有難度才有挑戰(zhàn),才有樂(lè)趣,不是么? 看到源程序,立馬被其擁有的函數(shù)的數(shù)量震撼了。 3) 增加修改功能 我定義了 friend_node::modify_record 函數(shù),用來(lái)修改用戶(hù)的姓名、電話。 (2) 增加記錄修改功能,能選擇修改用戶(hù)的姓名、電話。 (3) 增加錄入時(shí)間的顯示及存儲(chǔ)。在函數(shù)中,我運(yùn)用了 ifelse,switch 等語(yǔ)句并對(duì)函數(shù)進(jìn)行了重載。把它們封裝起來(lái)費(fèi)了我不少精力。編出來(lái) 的程序能夠?yàn)槲覀兎?wù),程序才有意義。//定義一字符型變量,用于接 受輸入的任意鍵 public: //函數(shù)原形說(shuō)明 void handle_choice(int choice)。//顯示鏈表 void delete_record()。 void search_by_name()。 ,friend_nodeamp。 cout \t\t 歡迎使用電話簿管理程序 完美中文版 endlendl。 //初始化鏈?zhǔn)字羔槥榭? load_list_from_file()。 cout 7 退出系統(tǒng) \n\n。 case 2: display_list()。 case 6: help_me()。 break。 (new_rec_ptrlast_name,20)。)。 CurrentTime=localtime(amp。 }system(cls)。//確定應(yīng)插入的位置 before_ptr = current_ptr。新節(jié)點(diǎn)即將插入此點(diǎn)。amp。 // 定義一臨時(shí)指針 ,保持跟蹤鏈?zhǔn)? temp_ptr = head_ptr。 // 使 current_ptr 的 next 指向欲插入節(jié)點(diǎn) ,從而使欲插入節(jié)點(diǎn)成為鏈尾 } // 使 current_ptr 指向鏈表尾的函數(shù) void friend_node::move_current_to_end() { current_ptr = head_ptr。 cout 姓 名 電話號(hào)碼 \n。 // 以下 3 行均為字符串處理函數(shù) ,實(shí)現(xiàn)拼接 strcat(fullname, )。 // 使 current_ptr 指向下一個(gè)結(jié)點(diǎn) . cout endl。 } } void friend_node::jqsearch_by_name() //精確查找某一記錄 { system(cls)。 //輸入姓并保存在 last_name_string if(current_ptr != NULL) // 如果 current_ptr 不為空 ,查找開(kāi)始 { while( current_ptr!=NULL ) { if( strcmp(current_ptrlast_name, last_name_string) == 0) { temp_ptr=current_ptr。 co
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1