Question: [STRICTLY C++ Solution Needed] Whenever I try to run the program and access the 3rd display (that is written on lines 300-359) function I keep
![[STRICTLY C++ Solution Needed] Whenever I try to run the program](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66efc2ada63b6_97366efc2ad2dc54.jpg)






[STRICTLY C++ Solution Needed] Whenever I try to run the program and access the 3rd "display" (that is written on lines 300-359) function I keep getting this error that I have attached below

All the other functions are working properly but somehow I can not figure out this error. I would appreciate it if you can help. I am also uploading the "student.dat" file contents referenced in the code if you need to verify it.

vold search(string); void exportResults(); float findinimin(int",int); #include #include #include include include 30 37 38 39 an 41 42 2 3 4 5 6 7 8 9 18 11 12 13 14 15 16 int main() { while(1) { int chi using one std; int of test - 5; 44 45 46 47 AR 0 cout>sid; remove_student(sid); break; case 3: display(); break; Case Search: 31 32 33 34 35 vold add_student(); vold remove_student(string); void display(); void search(string); 36 71 71 73 74 75 76 void add student() { struct student s; string fnane, Inane; case Search: cout>sid; search(sid); break; case Result: export Results(); break; case Quit: exit(0); default: cout>s.id; cout>s.no_of_test; s.test_scores - new int(s.no_of_test); el litoral de las en la table de sana siku na stahi lal Ali 91 92 93 914 95 96 97 98 99 180 101 for(int i-e;i<.no_of_test cout enter the test score: cin>>s.test_scores[1]; ) coutstudents[i].ne_of_test: } 147 148 149 150 151 152 152 154 155 156 157 void remove_student(string sid) { int stu_no = getline(); stu_no struct student students[stu_no]; students[1].test_scores new Int(students[1].no_of_test); for(int j -4k-e; jeresult.size()-1; j++,kus) 188 189 190 191 192 stringstream stresult.at()); g>>students[i].test_scores[k]; } ifstrean fin; fin.open("student.dat"); 1f( sid.compare(students[1].id) = e) 159 160 194 195 flag - true 1 string line; int 1e; bool flag=false; vector result; while(Ifin.eof() { getline(fin,line); if (line.size()-) break; result.clear(); stringstrean s_streamline); //create string stream from the string 162 163 164 165 166 167 168 169 170 } [ 007 197 158 199 200 201 202 283 284 205 2006 if(flagstrue) { of stream of; of.open('students.dat"); 172 173 while(s_strean.good()) { string substr; getline(s_stream, substr, '.'); //get string delimited by come result.push_back(substr); } for(int je;jestu_no; j++) { if( sid.compare(students[3].id) I= ) 174 175 176 177 28 29 210 211 212 of>students.test_scores[k]; } string line; int 1-0 bool flag - false; vector result; 243 flag = true; break; } 242 241 244 245 246 while(lfin.cof() C getline(fin, line); if ( line.size() = a) break; 207 if(flag-true) if(flag-true) { cout>students[i].no_of_test; } students().test_scores new Int(students[1].no_of_test); 282 283 286 285 286 287 28 29 290 291 292 293 294 295 296 297 298 299 360 301 302 383 304 705 306 382 388 309 310 311 312 312 314 315 316 317 void display) { ifstream fin; fin.open("student.dat") int stu_no - getline(); struct student students(stu_no-1); 330 331 332 23 334 335 336 337 338 339 342 241 342 343 344 345 for(int j = 4,k=e; j result; while('fin.eof()) { getline(fin, line); if ( line.size() =) break; result.clear(); stringstream s stream(line); //create string stream from the string 34 348 249 350 for(int je;jestu_no-15j++) { coutstudents[1].no_of_test; void exportResults() 393 394 5 326 397 398 students[i].test_scores - new int(no_of_test); for(int j - 4,ke; jcresult.size()-1; j++,k++) int stu_no- getline(); stu no struct student students[stu_no); stringstream (result.at(5)); p>students[i].test_scores(k): 366 ofstream of of.open("average.dat"); Ifstream fing Fin.open('student.dat"); string line int 1-e; bool flag-false; vector result; while(fin.eof()) 368 369 se 371 372 373 374 375 376 | for(int 1-e;i