struct Course { string courseID; string courseName; string lecturerUser; string lecturerName; string lecturerDegree; int lecturerGender; string startDay; string endDay; string hourStart; string hourEnd; string Room; }; void AddNewCoures(Course* c, int& n) { ofstream fout; fout.open("CS162\\Schedule\\2019-2020-HK2-Schedule-19APCS1.txt", ios::out); if (!fout.is_open()) { return; } string ID; string Name; string User; string LName; string Degree; int Gender; string SDay; string EndDay; string HourStart; string HourEnd; string R; n++; fout << n; cout << "INFORMATION COURSE" << endl; cout << "Course ID: "; cin >> ID; c[n].courseID = ID; fout << c[n].courseID; /*cin.getline(temp.courseID, '\n'); cout << "Course name: "; getline(cin, temp.courseName, '\n'); cout << "Lecturer User: "; getline(cin, temp.lecturerUser, '\n'); cout << "Lecturer Name: "; getline(cin, temp.lecturerName, '\n'); cout << "Lecturer Degree: "; getline(cin, temp.lecturerDegree, '\n'); cout << "Lecturer Gender: "; fout >> c[n].lecturerGender >> endl; cout << "Start Day: "; getline(cin, temp.startDay, '\n'); cout << "End Day: "; getline(cin, temp.endDay, '\n'); cout << "Hour Start: "; getline(cin, temp.hourStart, '\n'); cout << "Hour End: "; getline(cin, temp.hourEnd, '\n'); cout << "Room: "; getline(cin, ctemp.Room, '\n');*/ } // file course.txt 1 CS162 Introduction to Programing dbtien Dinh Ba Tien TS 1 2020 04 01 2020 06 01 2 7 30 11 30 I42