VC电话薄管理系统.docxVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
/*第5题电话簿管理-源代码及关键源代码注解如下:*/ 严该程序仅用于学习,请勿用于商业目的*/ includeiostream.h #includestdlib.h #includestring.h includefstream.h includeconio.h includeiomanip.h struct information char first_name[15]; char last_namef201; char phone_num[12]; information *next; information *head_ptr; 〃全程变量,链头指针 information *current_ptr; 〃全程变量,用于指明当前在链表川的位置 void handle_choice(int choice); 〃选择操作 void add_record(); 〃增加记录 void insert_node(information *new_rec_ptr); // information *position」nsertion_point(char lastname[20]); void make_node_new_head(information *new_rec_ptr); void add_node_to_end(information *new_rec_ptr); void move_current_to_end(); void display」ist(); void delete_record(); void delete_head_of_list(); void delete_end_oLlist(information *previous_ptr); void delete_from_middle_oLHst(information *previous_ptr); int verify_delete(); void delete_node(information *previous_ptr); void delete_list(); void search_by_lastname(); void write_list_to_file(); void load」ist_from_file(); void help_me(); char pause; //main function int main() cout? ”欢迎使用电话薄管理软件1.0\n“; cout ? ”按 Enter 键继续:\n”; cin.get(pause); system(cls); 〃执行系统命令:cis■清屏 int choice; head_ptr = NULL; // Initialize head pointer to NULL, load」ist_from_file(); // Load data from the disk file into linked list, do { // Display menu.-?主菜单显示 cout ?H1 -增加记录\n”; cout? ”2?展示所有记录\n”; cout ? ”3?通过姓氏查询\n”; cout ? H4?删除记录\n”; cout ? 5 -帮助\n”; cout? 6 -退 11!程序\n”; cout? ”输入需要的操作:”; cin ? choice; handle_choice(choice); // Call function to direct flow based on choice. }while(choice != 6); // Repeat menu until user chooses to exit? return 0; }// end of main function // Function to direct program flow based on users choice. void handle_choice(int choice) 〃选择操作 { switch(choice) { case 1: add_record(); break; case 2: display」ist(); break; case 3: search_by_lastname(); break; case 4: delete_record(); break; case 5: help_me(); break; case 6: write_list_to_file(); // save database to a file and if(head_ptr != NULL) // delete the list from memory. delete_list(

文档评论(0)

ggkkppp + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档