Re: Sorting a map by value
From: Kevin W. (contact_at_in.sig)
Date: 08/25/04
- Next message: Carter Smith: "language books don't get outdated"
- Previous message: Dave Townsend: "Re: memory corruption while debugging"
- In reply to: Rolf Magnus: "Re: Sorting a map by value"
- Next in thread: Philippe Guglielmetti: "Re: Re: Sorting a map by value"
- Reply: Philippe Guglielmetti: "Re: Re: Sorting a map by value"
- Reply: Kai-Uwe Bux: "Re: Sorting a map by value"
- Reply: Richard Herring: "Re: Sorting a map by value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 Aug 2004 06:20:06 GMT
>> How do I sort a map by the value, rather than the key?
>
> You can't sort maps. They are always automatically sorted by key.
Yes, but I should be able to define the "less than" predicate in the
constructor, or I should be able to pass a custom predicate into the sort
function (as I understand it, you *can* sort a map because it is only
automatically sorted when pairs are added or removed).
What I'm really asking is:
What are the arguments to this functor (values, pointers or references),
and
How do I access the value from these arguments?
-- Kevin W :-) Opera/CSS/webdev blog: http://www.exclipy.com/ Using Opera: http://www.opera.com/m2/
- Next message: Carter Smith: "language books don't get outdated"
- Previous message: Dave Townsend: "Re: memory corruption while debugging"
- In reply to: Rolf Magnus: "Re: Sorting a map by value"
- Next in thread: Philippe Guglielmetti: "Re: Re: Sorting a map by value"
- Reply: Philippe Guglielmetti: "Re: Re: Sorting a map by value"
- Reply: Kai-Uwe Bux: "Re: Sorting a map by value"
- Reply: Richard Herring: "Re: Sorting a map by value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|