VC++电话薄管理系统.doc

  1. 1、本文档共13页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VC电话薄管理系统

/*第5题 电话簿管理--源代码及关键源代码注解如下:*/ /*该程序仅用于学习,请勿用于商业目的*/ #includeiostream.h #includestdlib.h #includestring.h #includefstream.h #includeconio.h #includeiomanip.h struct information { char first_name[15]; char last_name[20]; 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_insertion_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_list(); void delete_record(); void delete_head_of_list(); void delete_end_of_list(information *previous_ptr); void delete_from_middle_of_list(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_list_from_file(); void help_me(); char pause; //main function int main() { cout 欢迎使用电话薄管理软件1.0\n; cout 按Enter键继续:\n; cin.get(pause); system(cls); //执行系统命令:cls-清屏 int choice; head_ptr = NULL; // Initialize head pointer to NULL. load_list_from_file(); // Load data from the disk file into linked list. do { // Display menu.-- 主菜单显示 cout 1 - 增加记录\n; cout 2 - 展示所有记录\n; cout 3 - 通过姓氏查询\n; cout 4 - 删除记录\n; cout 5 - 帮助\n; cout 6 - 退出程序\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_list(); break; case 3: search_by_lastname(); break; case 4: delete_record(); break

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

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

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档