关注数: 4 粉丝数: 1 发帖数: 309 关注贴吧数: 1
求助,这段带码报的这个错误 #include<iostream.h> #include<string.h> #include<fstream.h> class staff {      char number[20],type[20],name[20],education[20],branch[20],position[20];      double age; public:      staff()      {      }      staff(char n[20],char ty[20],char na[20],char edu[20],char bra[20],char pos[20],double a)      {          strcpy(number,n);          strcpy(type,ty);          strcpy(name,na);          age=a;          strcpy(education,edu);          strcpy(branch,bra);          strcpy(position,pos);      }          friend void main(); };      void main() {      cout<<"请选择您需要的操作!"<<endl;      cout<<"(1)添加职工"<<endl;      cout<<"(2)修改职工数据"<<endl;      cout<<"(3)查询职工信息"<<endl;      cout<<"(4)删除职工"<<endl;      cout<<"(5)显示所有职工信息"<<endl;         char p;char w;      staff *s[50];      ofstream *file[50];      int i=0;      int j=0;      bool flag2=0;      do      {          cin>>p;          if((p>='1'&&p<='5'))          flag2=1;          else      cout<<"指令错误!请重新输入:"<<endl;      }while(flag2==0);      do{      switch(p)      {      case '1':          {              char d;              char number[20],type[20],name[20],education[20],branch[20],position[20];              double age;              do{                   cout<<"职工编号:";                  cin>>number;
1 下一页