hjack 发表于 2005-5-30 16:24

学过c语言的大虾帮帮忙咯

语法错误。。

stu是一个结构体数组,在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,stu.score,stu.score); //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 ]

蜗牛 发表于 2005-6-2 23:06

多谢hjack的支点哦
页: [1]
查看完整版本: 学过c语言的大虾帮帮忙咯