Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Maps - Part II

#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;
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content