帮忙看看这个函数为什么不能往txt文件写入
void AddMark(Student x[], fstream& y, fstream& z) {//主要用到z
cout << "请依次输入:学号,课程号,课程名称,学分,平时成绩,实验成绩,卷面成绩" << endl;
string to_recieve_enter;
getline(cin, to_recieve_enter);//接受之前的回车,好让下边的getline能接受新的输入流
string temp;
getline(cin, temp);
z.seekp(0, ios::end);
z << temp << endl;
RecordMarkInfo(x, z);//另一个函数,没影响
system("cls");
menu(x, y, z);
}