maverik
11/20/2008 3:35:00 PM
On Nov 20, 6:29 pm, joseph cook <joec...@gmail.com> wrote:
> On Nov 20, 10:28 am, maverik <maverik.m...@gmail.com> wrote:
>
> > On Nov 20, 6:21 pm, FFMG <spambuc...@myoddweb.com> wrote:
>
> > > What does the standard say that the output must be if I iterate thru
> > > the map?
>
> > According to the Bjarne map values is sorted by keys (17.4.1)
>
> > > How can I get the map in the right 'order'
>
> > Use sort()
>
> No, this is incorrect. A map is always sorted using std::less on the
> key (not the value).
Hmmm. I mean map values are sorted by keys. Of course, I mistyped
with "is", but where I said about values?
> It cannot be reordered.
Ya, you are right. When read FFMG's last question I think that he
wants to sort map. Of course, map elements order cannot be changed.