回复 9楼 邓士林
void display(worker a[],int n) //显示操作 { int i=0; if(n==0) { printf("Files are empty\n"); return; } do { printf("----------------------------\n"); printf("职工的工号为%s\n",a[i].num); printf("职工的姓名为%s\n",a[i].name); printf("职工的性别:%s\n",a[i].sex); printf("职工的所属二级单位:%s\n",a[i].danwei);<--这里不是%s,而是%d printf("职工的所学专业:%s\n",a[i].majoy); printf("职工的职称:%s\n",a[i].call); printf("职工的月工资:%d\n",a[i].salary); printf("职工的电话号码:%s\n",a[i].tell); i++; }while(i<n); }