| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 277 人关注过本帖
标题:帮忙修改下错误....错误显示为NO EXCEPTATION
取消只看楼主 加入收藏
qq447032018
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-1-20
收藏
 问题点数:0 回复次数:1 
帮忙修改下错误....错误显示为NO EXCEPTATION
#include<stdio.h>
#include<string.h>
enter();
browse();
search();
exit();
system();
input();
save();
printf_back();
load();
printf_face();
getch();
printf_one();

void menu()
{
int n,w1;
do
{
printf("\t\t************************************************\n\n");
printf("\t\t************************************************\n\n");
printf("\t\t *** choose function ************\n\n");
printf("\t\t *** 1 Enter new data ************\n\n");
printf("\t\t *** 2 Search by people.name and num*****\n\n");
printf("\t\t *** 3 Browse data ************\n\n");
printf("\t\t *** 4 Exit ************\n\n");
printf("\t\t************************************************\n\n");
printf("\t\t************************************************\n\n");
printf("Choose your number(1-4):[ ]\b\b");
scanf("%d",&n);
if(n<1||n>4) w1=1;
else w1=0;
}
while(w1==1);
switch(n)
{
case 1:enter();break;
case 2:search();break;
case 3:browse();break;
case 4:exit(0);
}
}


main()
{
system("cls");
menu();
}

#define N 100
struct people
{
char num[100];
char name[15];
char sex[20];
char age[20];
char xueli[20];
char gongzhi[20];
char address[20];
char telephone[20];
}
people[N];


# include <stdio.h>

enter()
{
int i,n;
printf("How many people(0-%d)?:",N-1);
scanf("%d",&n);
printf("\n Enter data now\n\n");
for(i=0;i<n;i++)
{
printf("\n Input %dth people record.\n",i+1);
input(i);
}
if(i!=0)save(n);
printf_back();
}


browse()
{
int i,n;
n=load();
printf_face();
for(i=0;i<n;i++)
{
if((i!=0)&&(i%10==0))
{
printf("\n\nPass any key to continue ....");
getch();
puts("\n\n");
}
printf_one(i) ;
}
printf("\tThere are %d record.\n",n);
printf("\nPass any key to back ...");
getch();
menu();
}


search()
{
int i,n,k,w1=1,w2,w3,w4,m,a;
struct people p;
n=load();
do
{
printf("\n\nWhich way do you want to choose? \n\t1).By mane By num [ ]\b\b");
scanf("%d",&m);
switch(m)
{
case 1:
do
{ k=-1;
printf("\n\nEnter name that you want to search name.");
scanf("%s",p.name);
printf_face();
for(i=0;i<n;i++)
if(strcmp(p.name,people[i].name)==0)
{ k=i;
printf_one(k);
break;
}
if(k==-1)
{ printf("\n\nNO exist!please");
printf("\n\nAre you again?\n\t1).again 2).NO and back [ ]\b\b");
scanf("%d",&w1);
if(w1==2)
printf_back();
}
}
while(k==-1&&w1==1);
break;
case 2:
do
{k=-1;
printf("\n\nEnter num that you want to search num.");
scanf("%s",p.num);
printf_face();

for(i=0;i<n;i++)
{k=i;
printf_one(k);break;
}


if(k==-1)
{
printf("\n\nNO exist!please");
printf("\n\nAre you again?\n\t1).again 2).NO and back [ ]\b\b");
scanf("%d",&w1);
if(w1==2)
printf_back();
}
}
while(k==-1&&w1==1);
break;
menu();
}



估计就是后面的seach出了问题,帮忙测试下,谢谢了
新人没分送,不好意思。
搜索更多相关主题的帖子: EXCEPTATION 
2010-01-20 12:50
qq447032018
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-1-20
收藏
得分:0 
帮帮忙啊
2010-01-20 15:39
快速回复:帮忙修改下错误....错误显示为NO EXCEPTATION
数据加载中...
 
   



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

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