看看我的结构体有何问题??
#include<iostream.h>#define Maxsize 20
struct student
{
char name[Maxsize];
int num;
float score;
}stu[3];
void main()
{
stu[1].name[2]='Li';
stu[1].name[6]='Huan';
stu[1].num=1001;
stu[1].score=96.5;
stu[2].name[3]='Xiao';
stu[2].name[6]='Ke';
stu[2].num=1002;
stu[2].score=83.5;
stu[3].name[3]='Hu';
stu[3].name[6]='Jing';
stu[3].num=1003;
stu[3].score=89.5;
for( int i=1; i<4; i++ )
{
cout<<stu[i].name[2]<<stu[i].name[6]<<" "<<stu[i].num<<" "<<stu[i].score<<endl;
}
}