how to earse element in set c++ s.erase code example Example: C++ remove element from set std::set<int> s {1,2,3}; s.erase(2);