Hey guys, I am having trouble trying to get iterators for inner sub-containers.
Basically imagine this simplified code:
typedef map<string, map<string, map> > double_map;
double_map dm;
.. //some code here
for(double_map::iterator it = dm.begin(); it != dm.end(); it++){
//some code here
it->first // string
it->second // <---- this is the 2nd map, how do i get its iterator so I can wrap it
//in a for loop like above?
}
I need to be able to do this without using typedefs for every single inner container, is there a way to get an iterator for the inner container? I have structure that has 4 inner containers and I need to iterate through them all.
Thanks for the help