// C++11 and onwards for (auto const& keyValue : map) { keyValue.first; // Key keyValue.second; // Value }