I'm trying to add figure out how to put multiple names with the same highest score on the same test with the first and last name.
let's say
Mark Anderson 100%
Susan Barlow 87%
Tom Brown 100%
Maggie Change 99%
Maureen Ferguson 100%
The end result shows that Mark Anderson scored the highest, but it is clear that Tom Brown and Maureen Ferguson are also the highest
This is part of my code.
int find_highest_pos(vector<int>& test)
{
int max_pos=0;
for(int i=0; i<test.size(); i++)
{
if(test[max_pos]<test[i])
max_pos=i;
}
return max_pos;
}
fout<<"Test "<<1<<" highest: "<<setw(15)<<last[highest_pos[0]]<<setw(15)<<first[highest_pos[0]]<<setw(15)<<test1[highest_pos[0]]<<endl;
Then you should return a list of numbers from function rather than a single number
it it possible to only use vectors?