1234567891011
void Database::savestudentgrade(Grades g1){ for(int i=0; i<grades.size(); i=i+1){ Grades g2; g2=grades[i]; if (g2==g1){ replace (grades.begin(), grades.end(), g2,g1); break; } } grades.push_back(g1); }
12345
>>save-student-grade >>gradesoriginal >>save-student-grade >>gradesnew
gradesnew gradesnew