View Single Post
Old 10-14-2004, 02:43 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,693
redhead is on a distinguished road
I'd read it into some sort of class ie:
Code:
class finish_time {
  int hours;
  int minuts;
  int seconds;
}

class racer{
  string name;
  finish_time time;
}
Have an array, or stack of racer's.
Then read in the name of the racer, store it int the name member of the class racer, read in the finsh time, store it in the time assigned to racer, then sort the array with time, as the sort key, and show the sorted ones.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote