View Single Post
  #4  
Old 07-16-2006, 02:51 AM
upsilon upsilon is offline
Shmoo
upsilon's Avatar
Join Date: Dec 2005
Location: Birmingham, Alabama
Posts: 58
upsilon is on a distinguished road
Well, there needs to be something in the temp.largest variable before the loop starts. On line 3, the first item in the array is dumped into it, and there isnt much point in starting the loop off at 0, since youd just be comparing the first value with its self. It also allows for cases where there is only one donator, donators.size() will be equal to 1, so the loop will be skipped, and the first and only item in the array is returned.
__________________
Health nuts are going to feel really stupid someday, lying in hospitals dying of nothing. - Redd Foxx

Last edited by upsilon; 07-16-2006 at 03:04 AM..
Reply With Quote