ZKX's LAB

数据结构链表通讯录参考文献 怎么编写用数据结构通讯录

2020-07-20知识9

求一个数据结构的链表通讯录 /再次贴我的这个程序—只要把相应的项改成你要的就行…无语中,那么多人用这个程序includeincludeincludeclass List{public:string goods;string status;int value;int num;int pos;List*next;};class Head{public:List*next;int ListLength;};string CUR_FILE(\"UNTITLED\");bool PrintList(Head*p);bool BuildTXT(Head*,string);void PrintTXT(string filename){string option=\"if exist;option=option+filename+\"type\"+filename;system(option);}/PrintTXTbool InitList(Head*&p){if。(p=new Head))return false;else{p->;ListLength=0;p->;next=NULL;return true;}}/InitListbool Number(Head*&p){List*lp=p->;next;int i=0;while(lp){lp->;pos=i;lp=lp->;next;i+;}return true;}/Numberbool CreateList(Head*&p,List*&end){List*lp,temp;cout;if。(p->;next=lp=new List))return false;cin>;>;lp->;goods>;>;lp->;status>;>;lp->;value>;>;lp->;num;while(lp->;num&lp->;value){if。(lp->;next=new List))return false;else p->;ListLength+;temp=lp;lp=lp->;next;cin>;>;lp->;goods>;>;lp->;status>;>;lp->;value>;>;lp->;num;}delete lp;end=temp;temp->;next=NULL;if。Number(p))。高手帮我看一个程序 是不是由双向链表作数据结构的一个通讯录管理系统。 单向链表用C语言编写一个通讯录系统,集合数据结构双向链表知识 类似/include\"stdafx.hincludeincludeincludeclass stu{char name[20];double age,homephone,telphone;char sex;public:stu(){}stu(char n[20],char se,double ag,double ho,double te){strcpy(name,n);age=ag;homephone=ho;telphone=te;}friend void main();};void main(){cout请选择您需要的操作。cout操作:\";cout(0)通讯录录入\";cout(1)增加人员\";cout(2)删除人员\";cout(3)修改数据\";cout(4)显示记录\";cout(5)退出\";cout选择相关操作请输入相对的括号里的阿拉伯数字。stu*s[50];int i=0;int j=0;bool flag2=0;char p;do{cin>;>;p;if((p>;='0'&p))flag2=1;elsecout指令错误。请重新输入:\";}while(flag2=0);switch(p){ case '0':/(0)通讯录录入{char name[20];double age,homephone,telphone;char sex,c;do{ cout请输入姓名:\";cin>;>;name;cout请输入性别:\";cin>;>;sex;cout请输入年龄:\";cin>;>;age;cout请输入家里的电话号码:\";cin>;>;homephone;cout请输入移动电话号码:\";cin>;>;telphone;j+;s[i]=new stu(name,sex,age,homephone,telphone);i+;cout数据录入成功,想继续录入吗(y/n)\";cin>;>;c;flag2=0;do{if(c。'y'&c。'n'){cout指令错误。请重新输入。cin>;>;c;}。C语言数据结构:链表的应用--通讯录管理 HELLO.C-Hello,world*/includestructperson{charname[8];chartel[15];charaddr[50];};charfilename[20]=\"E:\\txl.txt;FILE*f…

#printf#数据结构#char#算法与数据结构#链表

随机阅读

qrcode
访问手机版