|
语法错误。。
stu[N]是一个结构体数组,在printf里却没有数组下标。
主函数里调用print时参数用数组名就行了。
void print(struct student stu[])
{int i;
for(i=0;i<N;i++)
{printf(FORMAT,stu.num,stu.name,stu.sex,stu.age,
stu.score[0],stu.score[1],stu.score[2]); //modify here stu. change to stu.
printf("\n");}
}
main()
{clrscr();
print(stu); //modify here stu[] change to stu
}
[ Last edited by hjack on 2005-5-30 at 16:31 ] |
|