Skip to content

Instantly share code, notes, and snippets.

Created June 26, 2009 08:04
Show Gist options
  • Save anonymous/136368 to your computer and use it in GitHub Desktop.
Save anonymous/136368 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
#include <map>
#include <string>
using namespace std;
int main()
{
map<string,int> M[5];
M[0]["a"]=5566;
M[1]["b"]=7788;
M[2]["c"]=9999;
M[3]["d"]=1234;
M[4]["e"]=5678;
map<string,map<string,int>> first;
first["1"]=M[0];
first["2"]=M[1];
first["3"]=M[2];
first["4"]=M[3];
first["5"]=M[4];
map<string,int>::iterator it;
for ( it=first["1"].begin() ; it != first["1"].end(); it++ )
cout << (*it).first << " => " << (*it).second << endl;
system("PAUSE");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment