#include <iostream>
#include <map>
using namespace std;
int main()
{
map<int, int> myMap;
myMap.insert({0, 3});
myMap.insert({2, 4});
myMap.insert({-2, 1});
for (auto i = myMap.begin(); i != myMap.end(); i++)
{
cout << i->first << " " << i->second << endl;
}
std::cout << "Hello World" << std::endl;
}
map遍历及其有序性
最新推荐文章于 2024-06-10 12:12:46 发布