| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 809 人关注过本帖
标题:[求助]出现错误local function definitions are illegal
只看楼主 加入收藏
weiteng111
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-6-29
收藏
 问题点数:0 回复次数:0 
[求助]出现错误local function definitions are illegal

void search(struct department dep[100],struct person per[50])
{

char name[50];
int i,j,k;
printf("请输入查询方式i:");
scanf("%d",i);
printf("please input name:");
scanf("%s",name);
if(i==0){
while(strcmp(dep[j].name,name))
printf("%s",dep[j].number);
}

else {
while(strcmp(per[j].name,name))
printf("%s",per[j].number);
}
}

void main(){
int ch;
printf("please input ch");
scanf("%d",&ch);
struct department dep[100];
struct person per[50];
read();
do{
printf("\n\n \2\2\2\2\2\2\2\2\2\2\2\2\2\2电★话★查★询★系★统\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\n");
printf("\n1添加\n2读取所有\n3查找\n4删除\n5修改\n6退出\n进行那个操作(1,2,3,4,5,6)?");
scanf("%d",&ch);
if(ch==1)
person_add(struct person per[50]);
if(ch==2)
read();
if(ch==3)
search(struct department dep[100],struct person per[50]);
if(ch==5)
person_change(struct person per[50]);
}while(ch!=6);
write();
}



出现错误:D:\123.cpp(97) : error C2601: 'search' : local function definitions are illegal
D:\123.cpp(116) : error C2601: 'main' : local function definitions are illegal
D:\123.cpp(138) : fatal error C1004: unexpected end of file found

搜索更多相关主题的帖子: department function search local 
2006-06-29 21:03
快速回复:[求助]出现错误local function definitions are illegal
数据加载中...
 
   



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

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