@@ -1,20 +0,0 @@
-#include <unordered_map>
-#include <iostream>
-int main()
-{
- std::unordered_map<int, std::string> c = {{1, "one"}, {2, "two"}, {3, "three"},
- {4, "four"}, {5, "five"}, {6, "six"}};
- // 从 c 擦除所有奇数
- for(auto it = c.begin(); it != c.end(); )
- if(it->first % 2 == 1)
- it = c.erase(it);
- else
- ++it;
- c.erase(2);
- c.erase(7);
- for(auto& p : c)
- std::cout << p.second << ' '<<std::endl;
- std::string s="";
- std::cout << std::stoi(s)<<std::endl;
-}