Question: this is my code. its supposed to read from the text file and save it into an class of array and output it into accending

 this is my code. its supposed to read from the textfile and save it into an class of array and output itinto accending order and then break into groups based on their class

this is my code. its supposed to read from the text file and save it into an class of array and output it into accending order and then break into groups based on their class standing and their avg gpas and were using operator overload. I run my code and its blank and i dont know how to output them into groups based on their standing with the gpas. please answer based on my code and any suggestions/fixes are on my code. dont output other codes or things that dont directly help me.

text file

standing and their avg gpas and were using operator overload. I run

d Text Run Diagnostics View Window Help >) 100% 242 Sat 11:32 AM Q E 7 days left - Buy Now Untitled 9.cpp - Edited Run Back/Forward View Untitled 9.cpp Stop Run Settings.. prog.cpp 59 70 71 72 Untitled 8.cpp myfile.close(); //gpa 73 74 75 double sum=0; for (int i=0;istudent[j].name) { temp=student[i]; student[i]=student[j]; 89 90 91 92 93 94 student[j]=temp; } 95 96 97 }}}}} Run Succeeded Time 27 ms Peak Memory 729K F Student Tabs: 4 Line 20, Column 1 A nd Text Run Diagnostics View Window Help 100% L2 Untitled 9.cpp - Edited Sat 11:32 AM Q E 7 days left - Buy Now - Back/Forward View + Run Stop Run Settings.... prog.cpp Untitled 8.cpp Untitled 9.cpp 38 39 int main() { //reading txt file 40 41 42 43 int i; Student a; Student student [25]; 44 45 46 ifstream myfile("College.txt"); 47 48 49 if (myfile.is_open() { 50 51 52 while(myfile>>a){ 53 54 student[i]=a; i++; 55 56 57 58 mmmmmmmmwwmwww88w88w83868w, 59 for(int i=0;i 2 #include #include 1 3 4 5 6 using namespace std; 7 8 class Student{ 9 10 11 public: Student({} friend istream& operator >>(istream &input, Students student); friend ostream& operator >(istream &input, Student& student){ ** input>> student.name > > student.level >> student.Gpa; return input; } 28 29 30 31 32 33 34 ostream& operator

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!