1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <map>
#include <string>
#include <iostream>
using namespace std;
int main() {
map<string,int> names;
names["John"] = 3;
names["Jane"] = 6;
cout << "names[\"John\"]: " << names["John"] << endl;
cout << "names[\"Jane\"]: " << names["Jane"] << endl;
return 0;
}
Enter to Rename, Shift+Enter to Preview