求大神解答呀 一直报错 说表达式必须指向完整类型的zhi'zhen

#include
using namespace std;
#include

//学生的结构体
struct student
{
string sName;
int score;
};

//老师的结构体定义
struct Teacher
{
string tName;
//学生
struct Student sArray[5];
};

//给老师和学生赋值
void allocateSpace(struct Tecaher tArray[] , int len )
{
string nameSeed = "ABCDE";
//给老师赋值
for (int i = 0; i < len; i++)
{
tArray[i].tName = "Teacher_";
tArray[i].tName += nameSeed[i];

    //给学生赋值
    for (int j = 0; j < 5; j++)
    {
        tArray[i].sArray.sName = "Student_";
        tArray[i].sArray[j].sName += nameSeed[j];
        tArray[i].sArray[j].score = 60;
    }

}

}

//打印信息
void printInfo(struct Teacher tArray[], int len)
{
for (int i = 0; i < len; i++)
{
cout << "老师的姓名:" << tArray[i].tName << endl;

    for (int j = 0; j < 5; j++)
    {
        cout << "学生姓名:" << tArray[i].sArray[j].sName << "考试分数:" << tArray[i].sArray[j].score << endl;
    }
}

}
int main() {

//创建三名老师的数组
struct Teacher tArray[3];

//赋值
int len = sizeof(tArray) / sizeof(tArray[0]);
allocateSpace(tArray,len);

//打印信息
printInfo(tArray, len);

system("pause");
return 0;

}

1.tArray[i].sArray.sName = "Student_";改为 tArray[i].sArray[j].sName = "Student_";

2.cout << "老师的姓名:" << tArray[i].tName << endl;改为cout << "老师的姓名:" << tArray[i].tName.c_str() << endl;

3.cout << "学生姓名:" << tArray[i].sArray[j].sName << "考试分数:" << tArray[i].sArray[j].score << endl;改为cout << "学生姓名:" << tArray[i].sArray[j].sName.c_str() << "考试分数:" << tArray[i].sArray[j].score << endl;

#include <iostream>
using namespace std;

#include <string>
//学生的结构体
struct student
{
string sName;
int score;
};
//老师的结构体定义
struct Teacher
{
string tName;
//学生
student sArray[5];
};
//给老师和学生赋值
void allocateSpace(Teacher tArray[] , int len )
{
string nameSeed = "ABCDE";
//给老师赋值
for (int i = 0; i < len; i++)
{
tArray[i].tName = "Teacher_";
tArray[i].tName += nameSeed[i];
    //给学生赋值
    for (int j = 0; j < 5; j++)
    {
        tArray[i].sArray[j].sName = "Student_";
        tArray[i].sArray[j].sName += nameSeed[j];
        tArray[i].sArray[j].score = 60;
    }

}
}
//打印信息
void printInfo(struct Teacher tArray[], int len)
{
for (int i = 0; i < len; i++)
{
cout << "老师的姓名:" << tArray[i].tName << endl;
    for (int j = 0; j < 5; j++)
    {
        cout << "学生姓名:" << tArray[i].sArray[j].sName << "考试分数:" << tArray[i].sArray[j].score << endl;
    }
}
}
int main() {
//创建三名老师的数组
struct Teacher tArray[3];

//赋值
int len = sizeof(tArray) / sizeof(tArray[0]);
allocateSpace(tArray,len);

//打印信息
printInfo(tArray, len);

system("pause");
return 0;
}

问题解决的话,请点下采纳