#include <iostream> #include <map> int main() { std::map<std::string, int> myMap; myMap["one"] = 1; myMap["two"] = 2; myMap["three"] = 3; for ( const auto &[key, value]: myMap ) { std::cout << key << ' '; } }