该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
#include
#include
#include
#include
#include
using namespace std;
struct course//Create a course structure for every course
{
string CourseName;
int mark;
};
struct student//Create a student structure for every student
{
string name;
int number;
string id;
vector ks;//Create a vector for the different courses a student may have
};
vector Class;//Create a class vector to hold every student
int main()
{
for(int i=0; i
{
ofstream OutFile("StudentsRecords.txt");
OutFile << Class[i].name << "\t";
OutFile << Class[i].number << "\t";
OutFile << Class[i].id << "\t";
for(int j=0; j
{
OutFile << Class[i].ks[j].CourseName << "\t";
OutFile << Class[i].ks[j].mark << "\t";
}
OutFile << endl;
}
cout << "Done"<
}