I'm working on a project with targets and candidates. I have to indicate the closest candidate match to each of the three targets. Each candidate is given a score in a list of 10 and I need to indicate the position in that list.
for(int k = 0; k < 6; k++)
{
cout << targets[i][k];
}
cout << setw(7) << ' ';
for(int k = 0; k < 6; k++)
{
cout << candidates[j][k];
}
cout << setw(10) << ' ';
cout << scores[i][j] << endl;
}
cout << endl;
int postn = bestresult[i]; // THIS IS WHERE I AM HAVING TROUBLE
cout << "The closest match is in position " << postn << "." << endl
<< endl << endl;
// IT READS THE SCORE VALUE NOT POSITION IN THE SCORE COLUMN
}
}