结构数据类型问题
一个简单的程序,但是说有一个错误,我找半天没找出来#include <iostream.h>
struct people
{
char name;
int age;
}
main()
{char na;
int ag;
struct people jorge[2];
for (i=0 ; i<2 ;i++)
{cin >> na >> ag;
jorge[i].age = ag;
jorge[i].name = na;
}
for (i=0 ; i<2 ;i++)
{
cout << jorge[i].name << endl ;
cout << jorge[i].age << endl ;
}
}