Sorry to trouble, as I am still learning C++, however, can anyone give me any insight how to work this problem. I have 2 functions, one to get the highest number out of the array, and one for the lowest. Both these functions work and give me the correct number, however, the problem is, I need to get the name associated with these numbers. The names are read in from a file (the file is a name and number on each line). If anyone has any tips what so ever - I am more than grateful!!!!!!!!!!
int getNameMost(int num[], string name[], int count)
{
int highest=num[0];
for(int i=0; i<count; i++)
{
if (highest<num[i])
highest=num[i];
}
return highest;
}
int getNameLeast (int num[], string name[], int count)
{
int lowest=num[0];
for(int i=0; i<count; i++)
{
if (lowest>num[i])
lowest=num[i];
}
return lowest;
}