Again, from map iterator to 'natural' element order ?

I have this map :
map "a",1
map "d",1
map "e",1
map "w",1

I use an iterator to any purpose. Ok, I have my iterator located or pointing to item "e", the 3rd element or the element with index=2.

How can I find or extract this 'index'. ?
Thanks
Last edited on
map iterators aren't random access, why would you need that?
You can start from yourmap.begin() and increment until you find a matching iterator but you should first consider whether what you are doing has some meaning
Topic archived. No new replies allowed.