erasing by value in set c++ code example Example: std::set remove item std::set<int> myset; myset.erase(value);