Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iostream>
- #include <iomanip>
- using namespace std;
- const int SIZE=30;
- class Student{
- public:
- void ReadFromFile(ifstream& fin);
- string GetName();
- void Output();
- private:
- string student_name;
- int student_number;
- float student_grade;
- };
- class Course{
- public:
- void ReadFromFile(ifstream& fin); //Always pass IF or OFstream by reference
- void SortByName();
- void Output();
- int FindSmallest(int start);
- private: string course_name;
- Student students[SIZE]; //Use for loop to fill array
- };
Add Comment
Please, Sign In to add comment