You are on page 1of 1

typedef map<string, list<string>>::const_iterator MapIterator;

for (MapIterator iter = mapex.begin(); iter != mapex.end(); iter++)


{
cout << "Key: " << iter->first << endl << "Values:" << endl;
typedef list<string>::const_iterator ListIterator;
for (ListIterator list_iter = iter->second.begin(); list_iter != iter->secon
d.end(); list_iter++)
cout << " " << *list_iter << endl;
}

You might also like