关于结构体的,运行的时候老是报错
#include <stdio.h>#define N 10
struck date
{
int year;
int month;
int day;
};
typedef struck employees
{
char name[];
int age;
struck date joindate;
}EM;
int main (void)
{
EM em[N];
int i;
printf("\n**************在职员工档案登记系统*************\n");
for(i=0;i<N;i++)
{
printf("\n添加新员工的档案\n");
printf("\n\n请输入第%d位员工的姓名",i);
gets(em[i].name);
printf("\n\n请输入第%d位员工的年龄",i);
scanf("%d",&em[i].age);
printf("\n\n请输入第%d位员工参加工作时间",i);
printf("\n年:");
scanf("%d",&em[i].joindate.year);
printf("\n月:");
scanf("%d",&em[i].joindate.mouth);
printf("\n日:");
scanf("%d",&em[i].joindate.day);
getchar();
}
printf("\n新增员工名单如下:\n");
for(i=0;i<N;i++)
{
printf("员工姓名:%-7s",em[i].name);
printf("员工年龄:%-7s",em[i].age);
printf("员工参加工作时间:%d年%d月%d日",em[i].joindate.year,em[i].joindate.mouth,em[i].joindate.day);
}
return 0;
}