#include <iostream>
using namespace std;
#include <string>
struct student
{
string sname;
int score;
};
struct teacher
{
string tname;
struct student stu[5];
};
void st(struct teacher a[], int len)
{
string nameSeed= "ABCDE";
for (int i = 0; i < len;i++)
{
a[i].tname = "teacher_";
a[i].tname += nameSeed[i];
for (int j = 0; j < 5; j++)
{
//给学生赋值
a[i].stu[j].sname = "student_";
a[i].stu[j].sname += nameSeed[j];
a[i].stu[j].score = 60;
}
}
怎么用结构体,不用类