Well You can use the sort function to list and get the max value .
For that you will need to write a bool comp() function for your datatype.
Comparison function that, taking two values of the same type than those contained in the list object, returns true if the first argument goes before the second argument in the specific order (i.e., if the first is less than the second), and false otherwise.
After sorting. The item in your list will be the greatest i guess.
Last edited by Sky Diploma; Oct 1st, 2008 at 11:07 am.
Reputation Points: 673
Solved Threads: 125
Practically a Posting Shark
Offline 818 posts
since Mar 2008