初级菜鸟,请教一个问题!
#define N 5struct student
{
char num[6];
char name[8];
int score[4];
}stu[N];
input(stu)
{
struct student stu[];
int i,j;
for(i<0,i<N;i++)
{
printf("\n please input %d of %d\n",i+1,N);
printf("num: ");
scanf("%s",stu[i].num);
printf("name: ");
scanf("%s",stu[i].name);
for(j=0;j<3;j++)
{
printf("score %d:",j+1);
scanf("%d",&stu[i].score[j]);
}
printf("\n");
}
}
print(stu)
struct studnet stu[];
{
int i,j;
printf(" \nNo. Name Sco1 Sco2 Sco3\n");
for(i=0;i<N;i++)
{
printf("%-6s%-10s",stu[i].num,stu[i].name);
for(j=0;j<3;j++)
printf("%-8d",stu[i].score[j]);
printf("\n");
}
}
void main()
{
input();
print();
}
D:\VC\201105\c4.cpp(10) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
D:\VC\201105\c4.cpp(30) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
D:\VC\201105\c4.cpp(30) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
不明白这个错误是什么意思!