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



											
	    

	