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

正文內(nèi)容

c課程設(shè)計(jì)電話簿管理(編輯修改稿)

2024-12-19 06:56 本頁面
 

【文章內(nèi)容簡介】 p_ptr = head_ptr。 // 使 temp_ptr 指向當(dāng)前的鏈?zhǔn)? new_rec_ptrnext = temp_ptr。 // 使欲插入節(jié)點(diǎn)的 next 指針指 向當(dāng)前鏈?zhǔn)? temp_ptrprev=new_rec_ptr。 //使 temp_ptr 指針的前向指針指向新插入節(jié)點(diǎn) head_ptr = new_rec_ptr。 // 再使欲插入節(jié)點(diǎn)成為新的鏈?zhǔn)?,即成功插入新節(jié)點(diǎn)至鏈表首 } // 使被 new_rec_ptr 所指的節(jié)點(diǎn)成為鏈尾的函數(shù) // 用來處理插入時(shí)的一類特殊情況 . void friend_node::add_node_to_end(friend_node *new_rec_ptr) { new_rec_ptrnext = NULL。 // 使欲插入節(jié)點(diǎn)的 next 指針指向 NULL. new_rec_ptrprev=tail_ptr。 move_current_to_end()。 // 調(diào)用 move_current_to_end()函數(shù)使 current_ptr指向鏈表尾 current_ptrnext = new_rec_ptr。 // 使 current_ptr 的 next 指向欲插入節(jié)點(diǎn) ,從而使欲插入節(jié)點(diǎn)成為鏈尾 } // 使 current_ptr 指向鏈表尾的函數(shù) void friend_node::move_current_to_end() { current_ptr = head_ptr。 // 把頭指針的地址給 current_ptr while(current_ptrnext != NULL) { // 遍歷鏈表直至到達(dá)鏈表尾 current_ptr = current_ptrnext。 } } // 顯示整個(gè)鏈表 void friend_node::display_list() { char fullname[36]。// 定義一個(gè)字符型數(shù)組 ,用來存放姓名 int n。//每屏顯示的紀(jì)錄數(shù) current_ptr = head_ptr。 // 把頭指針的地址給 current_ptr,從而實(shí)現(xiàn)遍歷鏈表 if(current_ptr != NULL) { cout endl。 cout 請(qǐng)輸入每屏顯示的紀(jì)錄數(shù) :。 cin n。 cout 姓 名 電話號(hào)碼 \n。 cout 錄 入 時(shí) 間 : nYear / nMonth / nDay / nHour:nMinuteendl。//輸出時(shí)間 cout \n。 do { int i=1。 while (i=namp。amp。current_ptr != NULL) { strcpy(fullname,)。 // 首先清空 fullname strcat(fullname, current_ptrlast_name)。 // 以下 3 行均為字符串處理函數(shù) ,實(shí)現(xiàn)拼接 strcat(fullname, )。 // 拼接為 last_name first_name strcat(fullname, current_ptrfirst_name)。 (ios::left)。//設(shè)置左對(duì)齊 cout setw(10)fullname。 (ios::left)。//取消設(shè)置左對(duì)齊 (ios::right)。//設(shè)置右對(duì)齊 cout setw(20) current_ptrphone_num endl。 current_ptr = current_ptrnext。 // 使 current_ptr 指向下一個(gè)結(jié)點(diǎn) . cout endl。 i++。 } cout 按 Enter 繼續(xù) \n。 (pause)。 (1,pause)。 } while(current_ptr != NULL)。 // 循環(huán)直到鏈表尾 system(cls)。 } else // 若鏈表為空 ,顯示此信息 { cout \n 沒有記錄可顯示 \n。 } } void friend_node::jqsearch_by_name() //精確查找某一記錄 { system(cls)。 char last_name_string[20]。// 定義一字符型數(shù)組用來存放 last_name current_ptr = head_ptr。 // 移 current_ptr 指針至鏈?zhǔn)? (20,39。\n39。)。 cout \n 請(qǐng)輸入你想查詢 (或修改)者的姓 : 。 (last_name_string,20)。 //輸入姓并保存在 last_name_string if(current_ptr != NULL) // 如果 current_ptr 不為空 ,查找開始 { while( current_ptr!=NULL ) { if( strcmp(current_ptrlast_name, last_name_string) == 0) { temp_ptr=current_ptr。 cout \n 找到信息 \n。 cout endl。 cout \n。 cout 姓名 電話號(hào)碼 \n。 cout \n。 (ios::left)。 (ios::right)。 cout current_ptrlast_name 39。 39。 current_ptrfirst_name 。 cout setw(36) current_ptrphone_num endl。 } current_ptr = current_ptrnext。 } current_ptr=temp_ptr。 } else { cout 沒有找到記錄 \n。 cout 按回車鍵繼續(xù) \n。 (pause)。 system(cls)。 } } void friend_node::search_by_name() //精確 查找某一記錄 { system(cls)。 char last_name_string[20]。// 定義一字符型數(shù)組用來存放 last_name char first_name_string[20]。 // 定義一字符型數(shù)組用來存放 first_name current_ptr = head_ptr。 // 移 current_ptr 指針至鏈?zhǔn)? (20,39。\n39。)。 cout \n 請(qǐng)輸入你想查詢 (或修改)者的姓 : 。 (last_name_string,20)。 //輸入姓并保存在 last_name_string (20,39。\n39。)。 cout \n 請(qǐng)輸入你想查詢 (或修改)者的名 :。 (first_name_string,20)。 //輸入名并保存在 first_name_string if(current_ptr != NULL) // 如果 current_ptr 不為空 ,查找開始 { while( current_ptr!=NULL ) { if( strcmp(current_ptrfirst_name, first_name_string) == 0 amp。amp。 strcmp(current_ptrlast_name, last_name_string) == 0) { temp_ptr=current_ptr。 cout \n 找到信息 \n。 cout endl。 cout \n。 cout 姓名 電話號(hào)碼 \n。 cout
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1