Hi,
I have a problem trying to iterate over a multimap (or rather map within map).
I have this:
But for a map within a map it won't work.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; }
Can someone help?
Thanks.



LinkBack URL
About LinkBacks



