📜  如何在 C++ 代码示例中迭代集合映射

📅  最后修改于: 2022-03-11 14:44:53.934000             🧑  作者: Mango

代码示例1
map> mp;
     for (auto const& pair : mp) {
         cout << pair.first << ": ";
         for (auto const& elem : pair.second) {
             cout << elem << ", ";
         }
         cout << "\n";
     }