Boost logo

Boost Users :

From: Oleg Smolsky (oleg.smolsky_at_[hidden])
Date: 2005-10-27 17:20:53


Hello Thorsten,

thanks for the ptr_vector clarifications. I have another question
about ptr_map:

I can declare a map iterator in the following way:
        ptr_map<string, SomeClass>::iterator i = m.begin();

Now, I'd expect to be able to compile the following, as with a normal
map:
        string s = i->first;
        i->second.SomeMethod();

...assuming SomeClass::SomeMethod() exists and is declared as public.

However, "first" and "second" don't seem to exist in ptr_map. Could
you shed some light on how I can iterate your map please?

Best regards,
Oleg.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net