用C++编写一个学生通讯录管理系统
其实这是我的数据结构之c++语言描述的作业。问题描述:实现学生通讯录管理的几个操作功能(新建,插入,删除、从文件读取、学如文件和查询、屏幕输出)。通讯录中学生的信息由有学...
其实这是我的数据结构之c++语言描述的作业。
问题描述:
实现学生通讯录管理的几个操作功能(新建,插入,删除、从文件读取、学如文件和查询、屏幕输出)。通讯录中学生的信息由有学号、姓名、出生日期、性别、电话和地址)。要求利用链式存储结构来实现。程序中要有一些文字注释(因为这个是作业,注重编写过程)。
其中。系统的菜单要如下:
1、新建学生通讯录
2、向学生通讯录插入学生信息
3、在通讯录删除学生信息
4、从文件中读取通讯录信息
5、向文件写入学生通讯录信息
6、在通讯录中查询学生信息
7、在屏幕中输入全部学生信息。
8、退出
用vc。因为在学c++嘛。又不是只为编写一个简单程序。控制台程序就行,不必可视界面啊。还有,不要出现c的命令,用c++来解决。(因为是学习,学C++) 展开
问题描述:
实现学生通讯录管理的几个操作功能(新建,插入,删除、从文件读取、学如文件和查询、屏幕输出)。通讯录中学生的信息由有学号、姓名、出生日期、性别、电话和地址)。要求利用链式存储结构来实现。程序中要有一些文字注释(因为这个是作业,注重编写过程)。
其中。系统的菜单要如下:
1、新建学生通讯录
2、向学生通讯录插入学生信息
3、在通讯录删除学生信息
4、从文件中读取通讯录信息
5、向文件写入学生通讯录信息
6、在通讯录中查询学生信息
7、在屏幕中输入全部学生信息。
8、退出
用vc。因为在学c++嘛。又不是只为编写一个简单程序。控制台程序就行,不必可视界面啊。还有,不要出现c的命令,用c++来解决。(因为是学习,学C++) 展开
6个回答
展开全部
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define FORMAT "%s\t\t%s\t\t%s\t%d\t%s\n"
int count=0;
struct Address
{
char Name[21];
int Age;
char Sex[6];
char ClassNum[11];
char PhonNum[12];
};
int Enterface();
int Add(Address book[]);
int Modify(Address book[]);
int Delent(Address book[]);
int Insert(Address book[]);
int Find(Address book[]);
int Show(Address book[]);
int FindName(Address book[]);
int FindClassNum(Address book[]);
int DelName(Address book[]);
int DelClassNum(Address book[]);
int FindPhonNum(Address book[]);
int Readtxt(Address book[]);
int Writetxt(Address book[]);
int Search(Address book[],char str1[],int n);
int FSearch(Address book[],char str2[],int n);
int Taxis(Address book[]);
int Exit();
////////////////////////////////////////////////////////////////////
void main()
{
Address book[100];
int choice;
char or='m';
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n");
printf("\n");
printf(" !!!欢迎使用班级通讯录系统!!!\n");
printf("\n");
printf(" !!!按任意键进入系统!!!\n");
printf("\n");
printf(" !!!管理员:******!!!\n");
printf("\n");
printf("///////////////////////////////////////////////////////\n");
system("pause");
system("cls");
Readtxt(book);
while(or=='m')
{
choice=Enterface();
switch(choice)
{
case 1: Add(book);
break;
case 2: Modify(book);
break;
case 3: Delent(book);
break;
case 4: Insert(book);
break;
case 5: Find(book);
break;
case 6: Show(book);
break;
case 7: Exit();
break;
default : printf("!!!输入错误!!!\n");
Exit();
break;
}
}
}
int Enterface()
{
int choice=0;
printf("*******************\n");
printf(" 1.添加\n");
printf(" 2.修改\n");
printf(" 3.删除\n");
printf(" 4.插入\n");
printf(" 5.查找\n");
printf(" 6.显示\n");
printf(" 7.退出\n");
printf("*******************\n");
printf("请输入您的选择:");
scanf("%d",&choice);
return choice;
}
int Add(Address book[])
{
char or='Y';
while('Y'==or)
{
printf("请输入姓名:");
scanf("%s",&book[count].Name);
flag1:
printf("请输入电话号码:");
scanf("%s",&book[count].PhonNum);
for(int i=0;i<count;i++)
{
if(strcmp(book[count].PhonNum,book[i].PhonNum)==0)
{
printf("!!!号码已存在!!!\n");
goto flag1;
}
}
flag2:
printf("请输入学号:");
scanf("%s",&book[count].ClassNum);
for(i=0;i<count;i++)
{
if(strcmp(book[count].ClassNum,book[i].ClassNum)==0)
{
printf("!!!学号已存在!!!\n");
goto flag2;
}
}
printf("请输入年龄:");
scanf("%d",&book[count].Age);
printf("请输入性别:");
scanf("%s",&book[count].Sex);
getchar();
count++;
printf("是否继续添加('Y'添加,其他键返回主界面):");
scanf("%c",&or);
if('Y'!=or)
{
system("cls");
break;
}
}
Taxis(book);
Writetxt(book);
// printf("sdfsdfsdf\n");
return 0;
}
int Modify(Address book[])
{
char str[11];
int flag=0;
int ksd=0;
printf("去年个输入学号:");
scanf("%s",&str);
for(int i=0;i<count;i++)
{
if(strcmp(str,book[i].ClassNum)==0)
{
if(ksd==0)
{
printf(" 姓名\t 电话\t\t学号\t性别\t年龄\n");
ksd=1;
}
printf("%8s\t%8s\t%s\t%s\t%d\n",book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Sex,book[i].Age);
// str[flag_num++]=i;
flag=1;
// i--;
break;
}
}
if(flag==0)
{
printf("!!!无此记录!!!\n");
return 0;
}
printf("请输入姓名:");
scanf("%s",&book[i].Name);
flag0:
printf("请输入电话号码:");
scanf("%s",&book[i].PhonNum);
for(int j=0;j<count;j++)
{
if(j==i)
continue;
if(strcmp(book[i].PhonNum,book[j].PhonNum)==0)
{
printf("!!!号码已存在!!!\n");
goto flag0;
}
}
flag3:
printf("请输入学号:");
scanf("%s",&book[i].ClassNum);
for(j=0;j<count;j++)
{
if(j==i)
continue;
if(strcmp(book[i].ClassNum,book[j].ClassNum)==0)
{
printf("!!!学号已存在!!!\n");
goto flag3;
}
}
printf("请输入年龄:");
scanf("%d",&book[i].Age);
printf("请输入性别:");
scanf("%s",&book[i].Sex);
getchar();
printf("修改完毕!\n");
Writetxt(book);
system("pause");
// printf("modify\n");
return 0;
}
int Delent(Address book[])
{
// printf("delent\n");
int choice=0;
printf("================\n");
printf(" 1.按姓名删除\n");
printf(" 2.按学号删除\n");
printf("================\n");
scanf("%d",&choice);
switch(choice)
{
case 1: DelName(book);
break;
case 2: DelClassNum(book);
break;
default :
break;
}
return 0;
}
int Insert(Address book[])
{
Add(book);
// printf("insert\n");
return 0;
}
int Find(Address book[])
{
int choice=0;
printf("================\n");
printf(" 1.按姓名查找\n");
printf(" 2.按学号查找\n");
printf(" 3.按电话查找\n");
printf("================\n");
scanf("%d",&choice);
switch(choice)
{
case 1: FindName(book);
break;
case 2: FindClassNum(book);
break;
case 3: FindPhonNum(book);
break;
default :
break;
}
// printf("find\n");
return 0;
}
int FindName(Address book[])
{
char aname[30];
printf("请输入要查找的名字:");
scanf("%s",&aname);
FSearch(book,aname,3);
return 0;
}
int FindClassNum(Address book[])
{
char anum[20];
printf("请输入要查找的学号:");
scanf("%s",&anum);
FSearch(book,anum,2);
return 0;
}
int FindPhonNum(Address book[])
{
char aphonnum[20];
printf("请输入要查找的学号:");
scanf("%s",&aphonnum);
FSearch(book,aphonnum,1);
return 0;
}
int Show(Address book[])
{
int or=0;
if(count==0)
{
printf("!!!无记录!!!\n");
system("pause");
system("cls");
}
else
{
printf(" 姓名\t 电话\t\t学号\t性别\t年龄\n");
for(int i=0;i<count;i++)
printf("%8s\t%8s\t%s\t%s\t%d\n",book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Sex,book[i].Age);
system("pause");
}
printf("是否排序?\n-=1.排序=- -=2.返回主界面=-\n");
scanf("%d",&or);
if(1==or)
Taxis(book);
return 0;
}
int DelName(Address book[])
{
char aname[20];
printf("请输入要删除的姓名:");
scanf("%s",&aname);
Search(book,aname,2);
return 0;
}
int DelClassNum(Address book[])
{
char anum[20];
printf("请输入要删除的学号:");
scanf("%s",&anum);
Search(book,anum,1);
return 0;
}
int Readtxt(Address book[])
{
FILE *fp1;
fp1=fopen("photonumbers.txt","r");
if(fp1 == NULL)
{
printf("wrong!\n");
system("pause");
}
while(!feof(fp1))
{
if(!fscanf(fp1,"%s\t\t%s\t\t%s\t%d\t%s",book[count].Name,book[count].PhonNum,
book[count].ClassNum,&book[count].Age,book[count].Sex))
printf("读入出错!");
count++;
}
count--;
fclose(fp1);
return 0;
}
int Writetxt(Address book[])
{
FILE *fp;
fp=fopen("photonumbers.txt","w");
for(int i=0;i<count;i++)
{
fprintf(fp,FORMAT,book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Age,book[i].Sex);
}
fclose(fp);
return 0;
}
int Search(Address book[],char str1[],int n)
{
int flag=0;
int str[5];
int flag_num=0;
int j;
int gf;
int ksd=0;
for(int i=0;i<count;i++)
{
if(n==1)
{
if(strcmp(str1,book[i].ClassNum)==0)
flag=2;
}
else if(n==2)
{
if(strcmp(str1,book[i].Name)==0)
flag=2;
}
if(flag==2)
{
if(ksd==0)
{
printf(" 姓名\t 电话\t\t学号\t性别\t年龄\n");
ksd=1;
}
printf("%8s\t%8s\t%s\t%s\t%d\n",book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Sex,book[i].Age);
str[flag_num++]=i;
flag=1;
}
}
if(flag==0)
{
printf("!!!无记录!!!\n");
system("pause");
system("cls");
}
if(flag==1)
{
printf("-=1.确认删除=-\t-=2.取消=-\n");
scanf("%d",&j);
if(1==j)
{
gf=1;
for(int m=str[0];m<count-flag_num;m++)
{
for(int j=gf-1;j<flag_num;j++)
{
if((m+gf)==str[j])
gf++;
}
strcpy(book[m].Name,book[m+gf].Name);
book[m].Age=book[m+gf].Age;
strcpy(book[m].ClassNum,book[m+gf].ClassNum);
strcpy(book[m].PhonNum,book[m+gf].PhonNum);
strcpy(book[m].Sex,book[m+gf].Sex);
}
count=count-flag_num;
Writetxt(book);
}
else if(2==j)
{
printf("!!!操作已取消!!!\n");
}
system("pause");
}
return 0;
}
int FSearch(Address book[],char str2[],int n)
{
int flag=0;
int ksd=0;
for(int i=0;i<count;i++)
{
if(n==1)
{
if(strcmp(str2,book[i].PhonNum)==0)
flag=2;
}
else if(3==n)
{
if(strcmp(str2,book[i].Name)==0)
flag=2;
}
else if(2==n)
{
if(strcmp(str2,book[i].ClassNum)==0)
flag=2;
}
if(flag==2)
{
if(0==ksd)
{
printf(" 姓名\t 电话\t\t学号\t性别\t年龄\n");
ksd=1;
}
printf("%8s\t%8s\t%s\t%s\t%d\n",book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Sex,book[i].Age);
flag=1;
}
}
if(1==flag)
system("pause");
else if(flag==0)
{
printf("!!!无此记录!!!\n");
system("pause");
system("cls");
}
return 0;
}
int Taxis(Address book[])
{
/* for(int i=0;i<count;i++)
{
for(int j=0;j<count-1-i;j++)
{
if(strcmp(book[j].ClassNum,book[j+1].ClassNum)>0)
{
Address bk;
strcpy(bk.Name,book[j].Name);
bk.Age=book[j].Age;
strcpy(bk.ClassNum,book[j].ClassNum);
strcpy(bk.PhonNum,book[j].PhonNum);
strcpy(bk.Sex,book[j].Sex);
strcpy(book[j].Name,book[j+1].Name);
book[j].Age=book[j+1].Age;
strcpy(book[j].ClassNum,book[j+1].ClassNum);
strcpy(book[j].PhonNum,book[j+1].PhonNum);
strcpy(book[j].Sex,book[j+1].Sex);
strcpy(book[j+1].Name,bk.Name);
book[j+1].Age=bk.Age;
strcpy(book[j+1].ClassNum,bk.ClassNum);
strcpy(book[j+1].PhonNum,bk.PhonNum);
strcpy(book[j+1].Sex,bk.Sex);
}
}
}
printf("!!!操作成功!!!\n");
system("pause");
system("cls");
Writetxt(book);*/
return 0;
}
int Exit()
{
exit(1);
return 0;
}
这个是我以前写的程序,本来有个已经写好的文档,里面存了一些虚拟的联系方式,如果需要,我把整个工程也发给你,留个邮箱....O(∩_∩)O~
#include<stdlib.h>
#include<string.h>
#define FORMAT "%s\t\t%s\t\t%s\t%d\t%s\n"
int count=0;
struct Address
{
char Name[21];
int Age;
char Sex[6];
char ClassNum[11];
char PhonNum[12];
};
int Enterface();
int Add(Address book[]);
int Modify(Address book[]);
int Delent(Address book[]);
int Insert(Address book[]);
int Find(Address book[]);
int Show(Address book[]);
int FindName(Address book[]);
int FindClassNum(Address book[]);
int DelName(Address book[]);
int DelClassNum(Address book[]);
int FindPhonNum(Address book[]);
int Readtxt(Address book[]);
int Writetxt(Address book[]);
int Search(Address book[],char str1[],int n);
int FSearch(Address book[],char str2[],int n);
int Taxis(Address book[]);
int Exit();
////////////////////////////////////////////////////////////////////
void main()
{
Address book[100];
int choice;
char or='m';
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n");
printf("\n");
printf(" !!!欢迎使用班级通讯录系统!!!\n");
printf("\n");
printf(" !!!按任意键进入系统!!!\n");
printf("\n");
printf(" !!!管理员:******!!!\n");
printf("\n");
printf("///////////////////////////////////////////////////////\n");
system("pause");
system("cls");
Readtxt(book);
while(or=='m')
{
choice=Enterface();
switch(choice)
{
case 1: Add(book);
break;
case 2: Modify(book);
break;
case 3: Delent(book);
break;
case 4: Insert(book);
break;
case 5: Find(book);
break;
case 6: Show(book);
break;
case 7: Exit();
break;
default : printf("!!!输入错误!!!\n");
Exit();
break;
}
}
}
int Enterface()
{
int choice=0;
printf("*******************\n");
printf(" 1.添加\n");
printf(" 2.修改\n");
printf(" 3.删除\n");
printf(" 4.插入\n");
printf(" 5.查找\n");
printf(" 6.显示\n");
printf(" 7.退出\n");
printf("*******************\n");
printf("请输入您的选择:");
scanf("%d",&choice);
return choice;
}
int Add(Address book[])
{
char or='Y';
while('Y'==or)
{
printf("请输入姓名:");
scanf("%s",&book[count].Name);
flag1:
printf("请输入电话号码:");
scanf("%s",&book[count].PhonNum);
for(int i=0;i<count;i++)
{
if(strcmp(book[count].PhonNum,book[i].PhonNum)==0)
{
printf("!!!号码已存在!!!\n");
goto flag1;
}
}
flag2:
printf("请输入学号:");
scanf("%s",&book[count].ClassNum);
for(i=0;i<count;i++)
{
if(strcmp(book[count].ClassNum,book[i].ClassNum)==0)
{
printf("!!!学号已存在!!!\n");
goto flag2;
}
}
printf("请输入年龄:");
scanf("%d",&book[count].Age);
printf("请输入性别:");
scanf("%s",&book[count].Sex);
getchar();
count++;
printf("是否继续添加('Y'添加,其他键返回主界面):");
scanf("%c",&or);
if('Y'!=or)
{
system("cls");
break;
}
}
Taxis(book);
Writetxt(book);
// printf("sdfsdfsdf\n");
return 0;
}
int Modify(Address book[])
{
char str[11];
int flag=0;
int ksd=0;
printf("去年个输入学号:");
scanf("%s",&str);
for(int i=0;i<count;i++)
{
if(strcmp(str,book[i].ClassNum)==0)
{
if(ksd==0)
{
printf(" 姓名\t 电话\t\t学号\t性别\t年龄\n");
ksd=1;
}
printf("%8s\t%8s\t%s\t%s\t%d\n",book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Sex,book[i].Age);
// str[flag_num++]=i;
flag=1;
// i--;
break;
}
}
if(flag==0)
{
printf("!!!无此记录!!!\n");
return 0;
}
printf("请输入姓名:");
scanf("%s",&book[i].Name);
flag0:
printf("请输入电话号码:");
scanf("%s",&book[i].PhonNum);
for(int j=0;j<count;j++)
{
if(j==i)
continue;
if(strcmp(book[i].PhonNum,book[j].PhonNum)==0)
{
printf("!!!号码已存在!!!\n");
goto flag0;
}
}
flag3:
printf("请输入学号:");
scanf("%s",&book[i].ClassNum);
for(j=0;j<count;j++)
{
if(j==i)
continue;
if(strcmp(book[i].ClassNum,book[j].ClassNum)==0)
{
printf("!!!学号已存在!!!\n");
goto flag3;
}
}
printf("请输入年龄:");
scanf("%d",&book[i].Age);
printf("请输入性别:");
scanf("%s",&book[i].Sex);
getchar();
printf("修改完毕!\n");
Writetxt(book);
system("pause");
// printf("modify\n");
return 0;
}
int Delent(Address book[])
{
// printf("delent\n");
int choice=0;
printf("================\n");
printf(" 1.按姓名删除\n");
printf(" 2.按学号删除\n");
printf("================\n");
scanf("%d",&choice);
switch(choice)
{
case 1: DelName(book);
break;
case 2: DelClassNum(book);
break;
default :
break;
}
return 0;
}
int Insert(Address book[])
{
Add(book);
// printf("insert\n");
return 0;
}
int Find(Address book[])
{
int choice=0;
printf("================\n");
printf(" 1.按姓名查找\n");
printf(" 2.按学号查找\n");
printf(" 3.按电话查找\n");
printf("================\n");
scanf("%d",&choice);
switch(choice)
{
case 1: FindName(book);
break;
case 2: FindClassNum(book);
break;
case 3: FindPhonNum(book);
break;
default :
break;
}
// printf("find\n");
return 0;
}
int FindName(Address book[])
{
char aname[30];
printf("请输入要查找的名字:");
scanf("%s",&aname);
FSearch(book,aname,3);
return 0;
}
int FindClassNum(Address book[])
{
char anum[20];
printf("请输入要查找的学号:");
scanf("%s",&anum);
FSearch(book,anum,2);
return 0;
}
int FindPhonNum(Address book[])
{
char aphonnum[20];
printf("请输入要查找的学号:");
scanf("%s",&aphonnum);
FSearch(book,aphonnum,1);
return 0;
}
int Show(Address book[])
{
int or=0;
if(count==0)
{
printf("!!!无记录!!!\n");
system("pause");
system("cls");
}
else
{
printf(" 姓名\t 电话\t\t学号\t性别\t年龄\n");
for(int i=0;i<count;i++)
printf("%8s\t%8s\t%s\t%s\t%d\n",book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Sex,book[i].Age);
system("pause");
}
printf("是否排序?\n-=1.排序=- -=2.返回主界面=-\n");
scanf("%d",&or);
if(1==or)
Taxis(book);
return 0;
}
int DelName(Address book[])
{
char aname[20];
printf("请输入要删除的姓名:");
scanf("%s",&aname);
Search(book,aname,2);
return 0;
}
int DelClassNum(Address book[])
{
char anum[20];
printf("请输入要删除的学号:");
scanf("%s",&anum);
Search(book,anum,1);
return 0;
}
int Readtxt(Address book[])
{
FILE *fp1;
fp1=fopen("photonumbers.txt","r");
if(fp1 == NULL)
{
printf("wrong!\n");
system("pause");
}
while(!feof(fp1))
{
if(!fscanf(fp1,"%s\t\t%s\t\t%s\t%d\t%s",book[count].Name,book[count].PhonNum,
book[count].ClassNum,&book[count].Age,book[count].Sex))
printf("读入出错!");
count++;
}
count--;
fclose(fp1);
return 0;
}
int Writetxt(Address book[])
{
FILE *fp;
fp=fopen("photonumbers.txt","w");
for(int i=0;i<count;i++)
{
fprintf(fp,FORMAT,book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Age,book[i].Sex);
}
fclose(fp);
return 0;
}
int Search(Address book[],char str1[],int n)
{
int flag=0;
int str[5];
int flag_num=0;
int j;
int gf;
int ksd=0;
for(int i=0;i<count;i++)
{
if(n==1)
{
if(strcmp(str1,book[i].ClassNum)==0)
flag=2;
}
else if(n==2)
{
if(strcmp(str1,book[i].Name)==0)
flag=2;
}
if(flag==2)
{
if(ksd==0)
{
printf(" 姓名\t 电话\t\t学号\t性别\t年龄\n");
ksd=1;
}
printf("%8s\t%8s\t%s\t%s\t%d\n",book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Sex,book[i].Age);
str[flag_num++]=i;
flag=1;
}
}
if(flag==0)
{
printf("!!!无记录!!!\n");
system("pause");
system("cls");
}
if(flag==1)
{
printf("-=1.确认删除=-\t-=2.取消=-\n");
scanf("%d",&j);
if(1==j)
{
gf=1;
for(int m=str[0];m<count-flag_num;m++)
{
for(int j=gf-1;j<flag_num;j++)
{
if((m+gf)==str[j])
gf++;
}
strcpy(book[m].Name,book[m+gf].Name);
book[m].Age=book[m+gf].Age;
strcpy(book[m].ClassNum,book[m+gf].ClassNum);
strcpy(book[m].PhonNum,book[m+gf].PhonNum);
strcpy(book[m].Sex,book[m+gf].Sex);
}
count=count-flag_num;
Writetxt(book);
}
else if(2==j)
{
printf("!!!操作已取消!!!\n");
}
system("pause");
}
return 0;
}
int FSearch(Address book[],char str2[],int n)
{
int flag=0;
int ksd=0;
for(int i=0;i<count;i++)
{
if(n==1)
{
if(strcmp(str2,book[i].PhonNum)==0)
flag=2;
}
else if(3==n)
{
if(strcmp(str2,book[i].Name)==0)
flag=2;
}
else if(2==n)
{
if(strcmp(str2,book[i].ClassNum)==0)
flag=2;
}
if(flag==2)
{
if(0==ksd)
{
printf(" 姓名\t 电话\t\t学号\t性别\t年龄\n");
ksd=1;
}
printf("%8s\t%8s\t%s\t%s\t%d\n",book[i].Name,book[i].PhonNum,
book[i].ClassNum,book[i].Sex,book[i].Age);
flag=1;
}
}
if(1==flag)
system("pause");
else if(flag==0)
{
printf("!!!无此记录!!!\n");
system("pause");
system("cls");
}
return 0;
}
int Taxis(Address book[])
{
/* for(int i=0;i<count;i++)
{
for(int j=0;j<count-1-i;j++)
{
if(strcmp(book[j].ClassNum,book[j+1].ClassNum)>0)
{
Address bk;
strcpy(bk.Name,book[j].Name);
bk.Age=book[j].Age;
strcpy(bk.ClassNum,book[j].ClassNum);
strcpy(bk.PhonNum,book[j].PhonNum);
strcpy(bk.Sex,book[j].Sex);
strcpy(book[j].Name,book[j+1].Name);
book[j].Age=book[j+1].Age;
strcpy(book[j].ClassNum,book[j+1].ClassNum);
strcpy(book[j].PhonNum,book[j+1].PhonNum);
strcpy(book[j].Sex,book[j+1].Sex);
strcpy(book[j+1].Name,bk.Name);
book[j+1].Age=bk.Age;
strcpy(book[j+1].ClassNum,bk.ClassNum);
strcpy(book[j+1].PhonNum,bk.PhonNum);
strcpy(book[j+1].Sex,bk.Sex);
}
}
}
printf("!!!操作成功!!!\n");
system("pause");
system("cls");
Writetxt(book);*/
return 0;
}
int Exit()
{
exit(1);
return 0;
}
这个是我以前写的程序,本来有个已经写好的文档,里面存了一些虚拟的联系方式,如果需要,我把整个工程也发给你,留个邮箱....O(∩_∩)O~
展开全部
私下找我,我发给你。我的那个很容易懂的,而且全是c++语言描述
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
看你急不急,等几天我也要开始写毕业论文了,如果不急等我写好了传上来吧,当然,我不确定我什么时候能写好。但是我想一定没有人愿意为了100分去专门写这个吧。当然,我也不是想要你分。因为我也不确定我什么时候能写好。
所以,最好还是去下载吧
所以,最好还是去下载吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可以通过Baidu Hi告知我们
有机会可能完成你所面临的任务
同样的要求也可能告知我们
ES:\\5F1368199ED71029E9F0F21EF045D091
有机会可能完成你所面临的任务
同样的要求也可能告知我们
ES:\\5F1368199ED71029E9F0F21EF045D091
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你一定要用VC吗?其实VB编界面要简单地多
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询