1 #include2 #include 3 #include 4 #include 5 using namespace std; 6 int main() 7 { 8 struct Student 9 {10 char name[10];11 long id;12 char major[10];13 float score;14 float score1;15 };16 17 Student a,b,c;18 Student d,e,f;19 20 ofstream outstr("E:\\a.txt",ios::out);21 ifstream instr;22 if(!outstr)23 {24 cout<<"Error!"< >a.name>>a.id>>a.major>>a.score>>a.score1;30 cin>>b.name>>b.id>>b.major>>b.score>>b.score1;31 cin>>c.name>>c.id>>c.major>>c.score>>c.score1;32 33 outstr< < < < < < < < < < < >d.name>>d.id>>d.major>>d.score>>d.score1;42 instr>>e.name>>e.id>>e.major>>e.score>>e.score1;43 instr>>f.name>>f.id>>f.major>>f.score>>f.score1;44 45 cout< < < < < <