Index: [thread] [date] [subject] [author]
  From: Huned M. Botee <huned.botee@duke.edu>
  To  : 
  Date: Sat, 13 Feb 1999 22:32:57 +0000

Re: using sort....

Luke Palmer wrote:
> 
> mmm....  yes, i know what you mean by derefrencing.  however, what i wanted
> to do is to say
> 
> myList.sort();
> 
> and have STL sort the appointments in the list according to the appointment
> comparison operators rather than sort the pointer values.  in short, i don't
> really want to write a sort.....  :)   however, i may have to.  any ideas?
> thanks.
> -luke

make a list of objects. sort it. make a list of pointers using the list
of objects. you end up with two parallel lists, sorted by object. One
list is of pointers to objects, another of objects. not efficient, but
it should work. you can then discard the list of objects and keep the
list of pointers to sorted objects.

ciao.

-- 


Huned M. Botee
huned.botee@duke.edu


Index: [thread] [date] [subject] [author]