#include <iostream>
#include <unordered_set>
using namespace std;
int main()
{
unordered_set<int> s;
s.emplace(1);
s.emplace(2);
for(auto e : s) cout << e << " " << endl;
s.erase(1);
cout << "\n删除后:" << endl;
for(auto e : s) cout << e << " " << endl;
return 0;
}
unordered_set删除一个元素erase
最新推荐文章于 2024-05-11 17:25:10 发布