Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started