i want to make a part of my program go through my vector and find the highest mark and then take that and display it to the user but to do that i would need to compare one integer to the others when i try it with an if statment it doesnt like it
int a = 1;
int b = 0;
for ( int i = 0; i < studentsVec.size(); i++) {
if (studentsVec[i].overall > studentsVec[b].overall){
a = i;
}
else {
a = b;
}
}