谁来帮我看看错误呀!
#include <stdio.h>#define N 5
struct student
{
int num;
char *name;
char sex;
float score;
};
void main()
{
struct student stu[N];
int i;
for(i=0;i<5;++i)
{
printf("请输入第%d个学员的信息:\n"i+1);
printf("学号:");
scanf("%d",&stu[i].num);
printf("姓名:");
fflush(stdin);
gets(stu[i].name);
}
}错误说明是C:\Documents and Settings\Administrator\桌面\jj\jj.c(16) : error C2146: syntax error : missing ')' before identifier 'i'
C:\Documents and Settings\Administrator\桌面\jj\jj.c(16) : error C2059: syntax error : ')'
执行 cl.exe 时出错.
[[italic] 本帖最后由 billtob 于 2007-12-10 10:52 编辑 [/italic]]