Hi,
I have a problem trying to iterate over a multimap (or rather map within map).
I have this:
Code:
#include <map>
using namespace std;
int main(){
map<string, map<string, string> > mymap;
map<string, map<string, string> >::iterator itm;
/* This is how I would iterate over a normal map;
for( it=mymap.begin(); it!=mymap.end(); ++it)
{
cout << "first: \t" << it->first << "second: \t" << it->second << endl;
}
OR
cout << mymap.find("ab")->second << endl;
*/
return 0;
}
But for a map within a map it won't work.
Can someone help?
Thanks.