#include <iostream>
#include <string>
#include <map>
using namespace std;
typedef map<string, int>::value_type pairType;
int main()
{
map<string, int> keywordsMap;
keywordsMap.insert(pairType("list", 4));
keywordsMap.insert(pairType("scene", 5));
keywordsMap.insert(map<string, int>::value_type("oracle", 5));
keywordsMap.insert(make_pair("mysql", 5));
keywordsMap["stl"] = 3;
keywordsMap["database"] = 8;
cout << keywordsMap.size() << endl;
map<string, int>::iterator it = keywordsMap.begin();
for (; it != keywordsMap.end(); it++)
{
cout << "key:" << it->first << ", value:" << it->second << endl;
}
map<string, int>::key_type kValue;
cout << typeid(kValue).name() << endl;
map<string, int>::mapped_type vValue;
cout << typeid(vValue).name() << endl;
map<string, int>::value_type pair;
cout << typeid(pair).name() << endl;
return 0;
}