| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1875 人关注过本帖
标题:怎么做这个课程设计啊?
只看楼主 加入收藏
ycx5300
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2006-1-10
收藏
 问题点数:0 回复次数:12 
怎么做这个课程设计啊?
谁能帮我做个课程设计啊?等着要交的,就有四天时间了啊!

C++课程设计题目

1.通讯录

设计一个学生类,类中有一些公有函数,能够实现插入,查询,修改,删除等功能。通过MAIN()函数测试。

2 设计一个字符串类,功能如下:

1) 能够用 + 来处理两个字符串的相加

2) 具有在一个字符串中搜索一个字符的功能

3) 具有在一个字符串中搜索另一个字符串的功能

4) 编写一个main()函数,测试你的字符串类的各种功能。

搜索更多相关主题的帖子: 课程 设计 
2006-01-10 11:59
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
收藏
得分:0 
你把你做的发上来看看.最起码要别人知道你用心做了.
不然这里的纯作业是很难有答复的.

=×&D o I p R e E n C g T l X&×=
2006-01-10 12:25
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
收藏
得分:0 
还有,你没看见头顶的大大老大有这个规定

=×&D o I p R e E n C g T l X&×=
2006-01-10 12:27
ycx5300
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2006-1-10
收藏
得分:0 

恩,帮一下啊
这是我写的:
#include<stdio.h>
#include<malloc.h>
#include<iostream.h>
#include<string.h>
#define len sizeof(struct school)
#define len1 sizeof(struct statitcs)
struct school
{

char name[20];
//int no;
struct school *next;
};
struct school *insert(void)
{ cout<<"********************************\n";
cout<<"特别提示:\n";
struct school *head,*rear,*p;
head=NULL;rear=NULL;
p=(struct school *)malloc(len);
cout<<"请输入姓名\n";cin>>p->name;
if(p->num==0)
return NULL;
while(p->num!=0)
{if(head==NULL)
{head=p;rear=p;}
else
{rear->next=p;
rear=p;
}
p=(struct school *)malloc(len);
cout<<"请输入姓名\n";cin>>p->name;
}
rear->next=NULL;
return head;
}
struct school *add(struct school *t)
{
struct school *s,*p;
p=(struct school *)malloc(len);
cout<<"请输入姓名\n";cin>>p->name;
s=t;
if(s==NULL)
{ p->next=s;
s=p;
return s;}
else
{while(s->next!=NULL)
{s=s->next;}
s->next=p;
p->next=NULL;
return t;}
}

void print(struct school *t)
{struct school *p;
p=t;
cout<<"\t姓名\n";
while(p!=NULL)
{cout<<p->name<<endl;
p=p->next;
}
}

void display(struct school *t,int n)
{struct school *p;
p=t;
while(p!=NULL)
{if(p->num==n)
cout<<p->name<<endl;
p=p->next;
}
}

struct school *deletes(struct school *t)
{struct school *p,*k,*k_head;int flag=0;
p=(struct school *)malloc(len);
cout<<"请输入要删除的信息\n";
cout<<"请输入姓名\n";cin>>p->name;
k=t;
while(k!=NULL)
{if((p->num==k->num)&&(k->project_num==p->project_num)&&!strcmp(p->name,k->name)&&(p->score==k->score))
{flag=1;
if(k==t)
{t=t->next;}
else
k_head->next=k->next;
}
else
k_head=k;
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要删除的信息\n";
return t;
}
void find(struct school *t)
{struct school *p;
p=t;
cout<<"\t姓名\n";
while(p!=NULL)
{cout<<p->num<<"\t\t"<<p->project_num<<"\t"<<p->name<<"\t"<<p->score<<endl;
p=p->next;
}
}

void find1(struct school *t)
{struct school *k;int flag=0;int num;
cout<<"姓名\n";
k=t;
while(k!=NULL)
{if(num==k->num)
{flag=1;cout<<k->name<<endl;}
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要的信息\n";
}
void find2(struct school *t)
{struct school *k;int flag=0;int num;

cout<<"请输入要查找的信息\n";
cout<<"请输入项目号\n";cin>>num;
cout<<"\t姓名\n";
k=t;
while(k!=NULL)
{if(num==k->project_num)
{flag=1;cout<<k->name<<endl;}
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要的信息\n";
}
void find3(struct school *t)
{struct school *k;int flag=0;char name[20];

cout<<"请输入要查找的信息\n";
cout<<"请输入姓名\n";cin>>name;
cout<<"姓名\n";
k=t;
while(k!=NULL)
{if(!strcmp(name,k->name))
{flag=1;cout<<k->name<<endl;}
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要的信息\n";
}

struct school *deletes1(struct school *t)
{struct school *k,*k_head;int flag=0;int num;
cout<<"请输入要删除的信息\n";
k=t;
while(k!=NULL)
{if(k->num==num)
{flag=1;
if(k==t)
{t=t->next;}
else
k_head->next=k->next;
}
else
k_head=k;
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要删除的信息\n";
return t;
}

struct school *deletes2(struct school *t)
{struct school *k,*k_head;int flag=0;int num;
cout<<"请输入要删除的信息\n";
k=t;
while(k!=NULL)
{if(k->project_num==num)
{flag=1;
if(k==t)
{t=t->next;}
else
k_head->next=k->next;
}
else
k_head=k;
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要删除的信息\n";
return t;
}

struct school *deletes3(struct school *t)
{struct school *k,*k_head;int flag=0;char name[20];
cout<<"请输入要删除的信息\n";
cout<<"请输入姓名\n";cin>>name;
k=t;
while(k!=NULL)
{if(!strcmp(k->name,name))
{flag=1;
if(k==t)
{t=t->next;}
else
k_head->next=k->next;
}
else
k_head=k;
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要删除的信息\n";
return t;
}

struct statitcs
{
int flag;
int total;
int no;
struct statitcs *next;
};

int total1(struct school *t,int n)
{struct school *p;
p=t;
int sum=0;
while(p!=NULL)
{if(p->num==n)
sum+=p->score;
p=p->next;
}
return sum;
}

void swap(struct statitcs *t1,struct statitcs *t2)
{struct statitcs *t;
t=(struct statitcs *)malloc(len1);
t->flag=t1->flag;t1->flag=t2->flag;t2->flag=t->flag;
t->total=t1->total;t1->total=t2->total;t2->total=t->total;
}

struct statitcs *set_place(struct statitcs *t)
{int i=1;
struct statitcs *p,*q;
p=t;
if(p==NULL)return t;
else
{p->no=1;
while(p->next!=NULL)
{q=p->next;

a:if((q->total==p->total))
{q->no=p->no;q=q->next;
if(q==NULL) return t;
goto a;}
if(q==NULL) return t;
else{p=q;i++;p->no=i;}
}
}
return t;
}

struct statitcs * sort( struct statitcs *t)
{struct statitcs *p1,*p2;
p1=t;
while(p1!=NULL)
{ p2=p1->next;

while(p2!=NULL)
{if((p1->total)<(p2->total))
swap(p1,p2);
p2=p2->next;
}
p1=p1->next;
}
return t;
}

void show(struct statitcs *t,struct school *t1)
{struct statitcs *p;
p=t;
while(p!=NULL)
{
cout<<"姓名\t"<<endl;
display(t1,p->flag);
p=p->next;
}
}

struct statitcs *creat(struct school *t)
{int a[100];int i=0;int flag1;
struct statitcs *head,*rear,*p;
struct school *k;k=t;
head=NULL;if(k==NULL)return NULL;
p=(struct statitcs *)malloc(len1);
p->flag=k->num;
p->total=total1(t,p->flag);
if(head==NULL)
head=p;rear=p;
k=k->next;
a=p->flag;
while(k!=NULL)
{flag1=1;
for(int m=0;m<=i;m++)
if(a[m]==k->num)
flag1=0;
if(flag1)
{p=(struct statitcs *)malloc(len1);
p->flag=k->num; i++;a=p->flag;
p->total=total1(t,p->flag);
rear->next=p;rear=p;}
k=k->next;
}
rear->next=NULL;
return head;
}
void swap1(struct school *t1, struct school *t2)
{struct school *t;
t=(struct school *)malloc(len);

strcmp(t->name,t1->name);strcmp(t1->name,t2->name);strcmp(t2->name,t->name);
}
struct school * sort1( struct school *t,int n)
{struct school *p1,*p2;
p1=t;
while(p1!=NULL)
{ p2=p1->next;

while(p2!=NULL&&)
{if((p1->score)<(p2->score))
swap1(p1,p2);
p2=p2->next;
}
p1=p1->next;
}
return t;
}
/*struct school *setplace1(struct school *t,int n)
{int i=1;
struct school *p,*q;
p=t;
if(p==NULL)return t;
else
{if(p->project_num==n)
p->no=1;
while(p->next!=NULL)
{q=p->next;
a:if((q->score==p->score)&&p->project_num==n&&q->project_num==n)
{q->no=p->no;q=q->next;
if(q==NULL) return t;
goto a;}
if(q==NULL) return t;
else{p=q;
if((q->score==p->score)&&p->project_num==n&&q->project_num==n)
{i++;p->no=i;}}
}
}
return t;
}
*/
void show1(struct school *t,int n)
{struct school *p;
p=t;
cout<<"<<"姓名\t"<<endl;

}

void sort_display(struct school *t)
{int a[100];int i=0;int flag1;
struct school *k;k=t;
if(k==NULL)cout<< "NULL\n";
a=k->project_num;
k=k->next;

for(int m=0;m<=i;m++)
{t=sort1(t,a[m]);
//setplace1(t,a[m]);
show1(t,a[m]);
}
}

void main()
{struct school *t;struct statitcs *s;char a;int flag=1,flag1=1,flag2=1;
t=NULL;
cout<<"\t\t***************************************************\n";

cout<<"\t\t***************************************************\n";
cin>>a;
while(a!='6')
{switch(a)
{case'1':flag=0;flag1=0;flag2=0;
t=insert();
cout<<"你输入的所有信息\n";
print(t);break;
case'2':cout<<"*****************\n1:添加一条信息\n2:退出\n*****************\n";
cin>>a;
while(a!='2')
{switch(a)
{case'1':t=add(t);break;
default:cout<<"\n请正确输入\n";break;
}
cout<<"*****************\n1:添加一条信息\n2:退出\n*****************\n";
cin>>a;
}
print(t);
break;
case'3':if(flag==1)
{cout<<"\t\t请先输入数据\n";break;}
cout<<"\t\t***************************************************\n";

cout<<"\t\t***************************************************\n";
cin>>a;
while(a!='5')
{switch(a)
{case'1':t=deletes(t); cout<<"删除后的信息\n";print(t);break;
case'2':t=deletes1(t);cout<<"删除后的信息\n"; print(t);break;
case'3':t=deletes2(t); cout<<"删除后的信息\n"; print(t);break;
case'4':t=deletes3(t); cout<<"删除后的信息\n";print(t);break;
default:cout<<"请正确输入\n";break;
}
cout<<"\t\t***************************************************\n";
cout<<"\n\t\t\t3:删除某一项目的信息\n\t\t\t4:删除某一姓名的信息\n\t\t\t5:退出\n";
cout<<"\t\t***************************************************\n";
cin>>a;
}
break;
case'4':if(flag2==1)
{cout<<"\t\t请先输入数据\n";break;}
cout<<"\t\t***************************************************\n";
cout<<"\n\t\t\t4:查找某一姓名的信息\n\t\t\t5:退出\n";
cout<<"\t\t***************************************************\n";
cin>>a;
while(a!='5')
{switch(a)
{case'1':find(t);break;
case'2':find1(t);break;
case'3':find2(t);break;
case'4':find3(t);break;
default:cout<<"请正确输入\n";break;
}
cout<<"\t\t***************************************************\n";
cout<<"\t\t\t1:查找所有信息\n\t\t\t4:查找某一姓名的信息\n\t\t\t5:退出\n";
cout<<"\t\t***************************************************\n";
cin>>a;
}
break;
case'5':if(flag1==1)
{cout<<"\t\t请先输入数据\n";break;}
cout<<"\t\t*************************************\n";

cout<<"\t\t*************************************\n";
cin>>a;
while(a!='3')
{switch(a)
{case'1':s=creat(t);s=sort(s);s=set_place(s);show(s,t);break;
case'2':sort_display(t);break;
default:cout<<"请正确输入\n";break;
}

}
break;
default:cout<<"请正确输入\n";
}
cout<<"\t\t***************************************************\n";

cout<<"\t\t***************************************************\n";
cin>>a;
}
}

[此贴子已经被作者于2006-1-10 14:20:57编辑过]

2006-01-10 14:16
ycx5300
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2006-1-10
收藏
得分:0 
不好意思 啊!
那个表情是不小心点上的
2006-01-10 14:21
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
收藏
得分:0 
这..这么..长呀!上帝请原谅她!!!

=×&D o I p R e E n C g T l X&×=
2006-01-10 15:37
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
收藏
得分:0 

你那人程序太多错误啦!


=×&D o I p R e E n C g T l X&×=
2006-01-10 15:43
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
收藏
得分:0 
把这个改好,还不如我新做一个呢!

=×&D o I p R e E n C g T l X&×=
2006-01-10 15:44
ycx5300
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2006-1-10
收藏
得分:0 
不好意思啊!是我平时积累的做好 ,但组织不起来。帮我一下啊。谢谢
2006-01-10 23:55
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
收藏
得分:0 

我帮你把所有的错误改正了.但这个程序还有很多地方需要优化和整理,
这你就自己完成吧!

#include <stdio.h>
#include <malloc.h>
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
#define len sizeof(struct school)
#define len1 sizeof(struct statitcs)
struct school
{

char name[20];
int num;
int project_num;
float score;
struct school *next;
};
struct school *insert(void)
{
cout<<"********************************\n";
cout<<"特别提示:\n";
struct school *head,*rear,*p;
char key;
head=NULL;
rear=NULL;
p=(struct school *)malloc(len);
cout<<"请输入姓名\n";
cin>>p->name;
if(p->num==0)
return NULL;
while(p->num!=0)
{
if(head==NULL)
{
head=p;rear=p;}
else
{
rear->next=p;
rear=p;
}
p=(struct school *)malloc(len);
cout<<"还有输入吗?(Y/N)\n";
cin>>key;
if(key=='N'||key=='n')
break;
cout<<"请输入姓名\n";
cin>>p->name;
}
rear->next=NULL;
return head;
}
struct school *add(struct school *t)
{
struct school *s,*p;
p=(struct school *)malloc(len);
cout<<"请输入姓名\n";
cin>>p->name;
s=t;
if(s==NULL)
{
p->next=s;
s=p;
return s;
}
else
{
while(s->next!=NULL)
{
s=s->next;
}
s->next=p;
p->next=NULL;
return t;
}
}

void print(struct school *t)
{
struct school *p;
p=t;
cout<<"\t姓名\n";
while(p!=NULL)
{
cout<<p->name<<endl;
p=p->next;
}
}

void display(struct school *t,int n)
{
struct school *p;
p=t;
while(p!=NULL)
{
if(p->num==n)
cout<<p->name<<endl;
p=p->next;
}
}

struct school *deletes(struct school *t)
{
struct school *p,*k,*k_head;
int flag=0;
p=(struct school *)malloc(len);
cout<<"请输入要删除的信息\n";
cout<<"请输入姓名\n";
cin>>p->name;
k=t;
while(k!=NULL)
{
if((p->num==k->num)&&(k->project_num==p->project_num)&&!strcmp(p->name,k->name)&&(p->score==k->score))
{
flag=1;
if(k==t)
{
t=t->next;
}
else
k_head->next=k->next;
}
else
k_head=k;
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要删除的信息\n";
return t;
}
void find(struct school *t)
{
struct school *p;
p=t;
cout<<"\t姓名\n";
while(p!=NULL)
{
cout<<p->num<<"\t\t"<<p->project_num<<"\t"<<p->name<<"\t"<<p->score<<endl;
p=p->next;
}
}

void find1(struct school *t)
{
struct school *k;
int flag=0;
int num;
cout<<"姓名\n";
cout<<"请输入项目号\n";
cin>>num;
k=t;
while(k!=NULL)
{
if(num==k->num)
{
flag=1;
cout<<k->name<<endl;
}
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要的信息\n";
}
void find2(struct school *t)
{
struct school *k;int flag=0;int num;

cout<<"请输入要查找的信息\n";
cout<<"请输入项目号\n";
cin>>num;
cout<<"\t姓名\n";
k=t;
while(k!=NULL)
{
if(num==k->project_num)
{
flag=1;cout<<k->name<<endl;
}
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要的信息\n";
}
void find3(struct school *t)
{
struct school *k;int flag=0;char name[20];

cout<<"请输入要查找的信息\n";
cout<<"请输入姓名\n";cin>>name;
cout<<"姓名\n";
k=t;
while(k!=NULL)
{
if(!strcmp(name,k->name))
{
flag=1;cout<<k->name<<endl;
}
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要的信息\n";
}

struct school *deletes1(struct school *t)
{
struct school *k,*k_head;
int flag=0;
int num;
cout<<"请输入要删除的信息\n";
cout<<"请输入项目号\n";
cin>>num;
k=t;
while(k!=NULL)
{
if(k->num==num)
{
flag=1;
if(k==t)
{
t=t->next;
}
else
k_head->next=k->next;
}
else
k_head=k;
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要删除的信息\n";
return t;
}

struct school *deletes2(struct school *t)
{
struct school *k,*k_head;
int flag=0;
int num;
cout<<"请输入要删除的信息\n";
cin>>num;
k=t;
while(k!=NULL)
{
if(k->project_num==num)
{
flag=1;
if(k==t)
{
t=t->next;
}
else
k_head->next=k->next;
}
else
k_head=k;
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要删除的信息\n";
return t;
}

struct school *deletes3(struct school *t)
{
struct school *k,*k_head;int flag=0;char name[20];
cout<<"请输入要删除的信息\n";
cout<<"请输入姓名\n";cin>>name;
k=t;
while(k!=NULL)
{
if(!strcmp(k->name,name))
{
flag=1;
if(k==t)
{
t=t->next;
}
else
k_head->next=k->next;
}
else
k_head=k;
k=k->next;
}
if(k==NULL&&flag==0)
cout<<"无法找到你要删除的信息\n";
return t;
}

struct statitcs
{
int flag;
int total;
int no;
struct statitcs *next;
};

int total1(struct school *t,int n)
{
struct school *p;
p=t;
int sum=0;
while(p!=NULL)
{
if(p->num==n)
sum+=p->score;
p=p->next;
}
return sum;
}

void swap(struct statitcs *t1,struct statitcs *t2)
{
struct statitcs *t;
t=(struct statitcs *)malloc(len1);
t->flag=t1->flag;
t1->flag=t2->flag;
t2->flag=t->flag;
t->total=t1->total;
t1->total=t2->total;
t2->total=t->total;
}

struct statitcs *set_place(struct statitcs *t)
{
int i=1;
struct statitcs *p,*q;
p=t;
if(p==NULL)
return t;
else
{
p->no=1;
while(p->next!=NULL)
{
q=p->next;

a:if((q->total==p->total))
{
q->no=p->no;
q=q->next;
if(q==NULL)
return t;
goto a;
}
if(q==NULL)
return t;
else
{
p=q;i++;
p->no=i;
}
}
}
return t;
}

struct statitcs * sort( struct statitcs *t)
{
struct statitcs *p1,*p2;
p1=t;
while(p1!=NULL)
{
p2=p1->next;

while(p2!=NULL)
{
if((p1->total)<(p2->total))
swap(p1,p2);
p2=p2->next;
}
p1=p1->next;
}
return t;
}

void show(struct statitcs *t,struct school *t1)
{
struct statitcs *p;
p=t;
while(p!=NULL)
{
cout<<"姓名\t"<<endl;
display(t1,p->flag);
p=p->next;
}
}

struct statitcs *creat(struct school *t)
{
int a;
int i=0;
int flag1;
struct statitcs *head,*rear,*p;
struct school *k;
k=t;
head=NULL;
if(k==NULL)
return NULL;
p=(struct statitcs *)malloc(len1);
p->flag=k->num;
p->total=total1(t,p->flag);
if(head==NULL)
head=p;rear=p;
k=k->next;
a=p->flag;
while(k!=NULL)
{
flag1=1;
//for(int m=0;m<=i;m++)
if(a==k->num)
flag1=0;
if(flag1)
{
p=(struct statitcs *)malloc(len1);
p->flag=k->num;
i++;
a=p->flag;
p->total=total1(t,p->flag);
rear->next=p;rear=p;}
k=k->next;
}
rear->next=NULL;
return head;
}
void swap1(struct school *t1, struct school *t2)
{
struct school *t;
t=(struct school *)malloc(len);

strcmp(t->name,t1->name);
strcmp(t1->name,t2->name);
strcmp(t2->name,t->name);
}
struct school * sort1( struct school *t,int n)
{
struct school *p1,*p2;
p1=t;
while(p1!=NULL)
{
p2=p1->next;

while(p2!=NULL)
{
if((p1->score)<(p2->score))
swap1(p1,p2);
p2=p2->next;
}
p1=p1->next;
}
return t;
}

void show1(struct school *t,int n)
{
struct school *p;
p=t;
cout<<"姓名\t"<<endl;

}

void sort_display(struct school *t)
{
int a;
int i=0;
//int flag1;
struct school *k;k=t;
if(k==NULL)
cout<< "NULL\n";
a=k->project_num;
k=k->next;

//for(int m=0;m<=i;m++)
//{
t=sort1(t,a);
//setplace1(t,a[m]);
show1(t,a);
//}
}

void main()
{
struct school *t;
struct statitcs *s;
char a;
int flag=1,flag1=1,flag2=1;
t=NULL;
cout<<"\t\t***************************************************\n";

cout<<"\t\t***************************************************\n";
cin>>a;
while(a!='6')
{
switch(a)
{
case'1':
flag=0;
flag1=0;
flag2=0;
t=insert();
cout<<"你输入的所有信息\n";
print(t);
break;
case'2':
cout<<"*****************\n1:添加一条信息\n2:退出\n*****************\n";
cin>>a;
while(a!='2')
{
switch(a)
{
case'1':
t=add(t);
break;
default:
cout<<"\n请正确输入\n";
break;
}
cout<<"*****************\n1:添加一条信息\n2:退出\n*****************\n";
cin>>a;
}
print(t);
break;
case'3':
if(flag==1)
{
cout<<"\t\t请先输入数据\n";
break;
}
cout<<"\t\t***************************************************\n";

cout<<"\t\t***************************************************\n";
cin>>a;
while(a!='5')
{
switch(a)
{
case'1':t=deletes(t);
cout<<"删除后的信息\n";
print(t);
break;
case'2':
t=deletes1(t);
cout<<"删除后的信息\n";
print(t);
break;
case'3':
t=deletes2(t);
cout<<"删除后的信息\n";
print(t);
break;
case'4':
t=deletes3(t);
cout<<"删除后的信息\n";
print(t);
break;
default:
cout<<"请正确输入\n";
break;
}
cout<<"\t\t***************************************************\n";
cout<<"\n\t\t\t3:删除某一项目的信息\n\t\t\t4:删除某一姓名的信息\n\t\t\t5:退出\n";
cout<<"\t\t***************************************************\n";
cin>>a;
}
break;
case'4':
if(flag2==1)
{
cout<<"\t\t请先输入数据\n";
break;
}
cout<<"\t\t***************************************************\n";
cout<<"\n\t\t\t4:查找某一姓名的信息\n\t\t\t5:退出\n";
cout<<"\t\t***************************************************\n";
cin>>a;
while(a!='5')
{
switch(a)
{
case'1':
find(t);
break;
case'2':
find1(t);
break;
case'3':
find2(t);
break;
case'4':
find3(t);
break;
default:
cout<<"请正确输入\n";
break;
}
cout<<"\t\t***************************************************\n";
cout<<"\t\t\t1:查找所有信息\n\t\t\t4:查找某一姓名的信息\n\t\t\t5:退出\n";
cout<<"\t\t***************************************************\n";
cin>>a;
}
break;
case'5':
if(flag1==1)
{
cout<<"\t\t请先输入数据\n";
break;
}
cout<<"\t\t*************************************\n";

cout<<"\t\t*************************************\n";
cin>>a;
while(a!='3')
{
switch(a)
{
case'1':
s=creat(t);
s=sort(s);
s=set_place(s);
show(s,t);
break;
case'2':
sort_display(t);
break;
default:
cout<<"请正确输入\n";
break;
}

}
break;
default:cout<<"请正确输入\n";
}
cout<<"\t\t***************************************************\n";

cout<<"\t\t***************************************************\n";
cin>>a;
}
}


=×&D o I p R e E n C g T l X&×=
2006-01-11 13:23
快速回复:怎么做这个课程设计啊?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019433 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved