|
From: HAB B. <ha...@gm...> - 2006-05-15 17:25:51
|
Hello
How can I iterate though this 2D map and print its content
map<string,map<string,string> > tmpmap;
map<string,map<string,string> >::iterator ipos,opos;
tmpmap["A"]["tblname"] =3Diter2->td_tblname;
tmpmap["A"]["fname"] =3Diter2->td_fname;
tmpmap["A"]["type"] =3Diter2->td_type;
tmpmap["A"]["size"] =3Diabuffer;
tmpmap["A"]["null"] =3Diter2->td_null;
tmpmap["A"]["index"] =3Diter2->td_index;
tmpmap["A"]["default"] =3Diter2->td_default;
tmpmap["B"]["tblname"] =3Diter2->td_tblname;
tmpmap["B"]["fname"] =3Diter2->td_fname;
tmpmap["B"]["type"] =3Diter2->td_type;
tmpmap["B"]["size"] =3Diabuffer;
tmpmap["B"]["null"] =3Diter2->td_null;
tmpmap["B"]["index"] =3Diter2->td_index;
tmpmap["B"]["default"] =3Diter2->td_default;
I tried this but no help
for(opos=3Dtmpmap.begin();opos!=3Dtmpmap.end();++opos)
{
for(ipos=3Dtmpmap.begin();ipos!=3Dtmpmap.end();++ipos)
{
//cout<<"\n"<<opos->second;
//cout<<"\n"<<opos->first;
cout<<"---" << opos->first<<"=3D=3D" <<"---"<< ipos->first<<endl;
}
}
|