#include<iostream>
using namespace std;
#include<string>
struct student {
string name;
int score;
};
struct teacher {
string name;
struct student stu[5];
};
//通过函数给每个老师及所带的学生赋值
void InitTeacher(teacher &s,string t1,student arr[5] )
{
s.name = t1;
for (int i; i < 5; i++){
s.stu[i].name = arr.stu[i].name;
· s.stu[i].score = arr.stu[i].score;
}
}
这是错误提示
严重性 代码 说明 项目 文件 行 禁止显示状态
错误(活动) E0153 表达式必须具有类类型,但它具有类型 "student *" Project1
严重性 代码 说明 项目 文件 行 禁止显示状态
错误(活动) E0135 class "student" 没有成员 "stu" Project1