#include <iostream>
#include <string>
#include <map>
void printMap(std::map<std::string, int> mp) {
for (auto &s: mp) {
std::cout << s.first << ": " << s.second << '\n';
}
}
int main ()
{
std::map<std::string,int> mp = {
{ "c++", 23 },
{ "c", 6 },
{ "python", 87 },
{ "java", 980 } };
printMap(mp);
return 0;
}
/*
run:
c: 6
c++: 23
java: 980
python: 87
*/