for(auto it = myMap.cbegin(); it != myMap.cend(); ++it) { std::cout << it->first << " " << it->second << std::endl; }