c++, linux, Do STL map iterator always return in same order when iterate from begin(
I have a map<string, int>. When iterate from map.begin() to map.end(), is STL gurantee the iteration always give my the key in same order?
Example: map<string, int> ABC; ABC.insert( map<string, int>::value_type("A123", 0)); ABC.insert( map<string, int>::value_type("34DC", 1)); ABC.insert( map<string, int>::value_type("XY34Z", 2)); map<string,int>::iterator itr = ABC.begin(); while (itr != ABC.end()){ //example order is "34DC" -> "XY34Z" -> "A123" itr++; } No mater how many time i repeat the iteration of ABC from begin() to end(), is STL gurantee always give me the same order? or it will be random order? thanks |
what are you doing? 14 new threads in 11 minutes? posting is utterly irrelevant forums? can you assure me that you are a genuine user with genuine questions??
not a networking question. moved to Linux - Newbie |
Chris ... I think this is a bot. If you google for any of "his"
new thread titles they give us hits to expert-sexchange, the infamous pay-forum. I'm very much inclined to ban the thing and delete all its threads. Cheers, Tink |
i did that with a couple, but nothing turned up at all... certainly seems likely.
|
Quote:
He did a good job of generating and titling posts to pull responses. Until you look at them as a group, each looks like a reasonable request. |
I'm totally baffled to the obvious question of "WHY???" though...
|
MY guess is that (since it turns the sexpert pages up for me) is that he
hopes that people trying to help will use the same terms in google, and will hit their homepage. Only sensible explanation; and then, to be able to see a SOLUTION you have to sign-up (and pay) most of the time. Cheers, Tink |
Sick of bot posting problems from a different forum verbatim on LQ
in irrelevant boards. Banning the thing and closing the threads. |
All times are GMT -5. The time now is 03:09 PM. |