Browse Source

del a.cpp

lixioayao 6 years ago
parent
commit
d18aca22ca
1 changed files with 0 additions and 20 deletions
  1. 0 20
      a.cpp

+ 0 - 20
a.cpp

@@ -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(2);
-                c.erase(7);
-                for(auto& p : c)
-                          std::cout << p.second << ' '<<std::endl;
-                std::string s="";
-                std::cout << std::stoi(s)<<std::endl;
-}