#include #include #include #include using namespace std; int main() { map myDict; myDict["hello"] = 1; myDict["world"] = 2; myDict["!"] = 3; for_each(myDict.begin(), myDict.end(), [](const pair& p) { cout << "key = " << p.first << ", value = " << p.second << endl; }); return 0; }