How to retrieve information in a map within a map

I have :
map <int, map<int,int> >;

Ok, anybody can help me to define an interator and a finder to this kind of map?
map[][] does not work inside a const function....
I dont know how to do it
Thanks.
map::operator[] may modify the map: if the key doesn't exist in the map, the key-value pair is inserted, and it returns a non-const reference, which may be used to modify the value.
You can use map::find to get a const_iterator: http://www.cplusplus.com/reference/stl/map/find/
Topic archived. No new replies allowed.