Get the name from the highest number out of an array

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!!!!!!!!!!

I have tried your suggestion above and thus used highestindex as the array value for the name. However, it is returning the name that is the highest value in the array - it is returning name[35] instead of name[0], which is the name associated with the highest number value. Then when I added one to highest index, it is returning no value, as I am assuming that it is trying to return name[36], and there is no name[36] - any further suggestions? :-(

But remember you may need to add 1 to highestindex before you output it since your text file probably starts with 1. rather than 0.

What I meant by that statement was if your record is saying
1. Jane Smith 87
2. Bob Jones 89
then it's going to return index 1 for the highest number, but that's your person #2 is all.
(if only I can go back in time and write it like that yesterday)

Holy smokes - you are the best!! It was the braces that were misplaced. Thanks so much! I have stared at this for hours and tried all sorts of different things, low and behold - its the braces. How can something so small - be something so big :-) Thanks again!!!!