map_in_cpp

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include<map> #include<string> using namespace std; // map is an associative array int main() { cout << "Hello World!"<< endl ; map<string, int > marksmap ; marksmap["ganesh"] = 100 ; marksmap["saurabh"] = 98 ; marksmap["rupesh"] = 96 ; marksmap.insert({{"korumi" , 92} , {"suzuke" , 42}}); map<string , int > :: iterator it ; for(it = marksmap.begin() ; it != marksmap.end() ; ++it) { cout << (*it).first <<" " << (*it).second << endl ; } return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines