#include <set> void clear();
The function clear() deletes all of the elements in the multiset. This will call the destructor for all of the elements in the multiset. clear() runs in linear time.
If you want to empty a multiset of all of its elements, as well as its capacity, then you can use the swap trick:
std:: multiset aMultiset; //[...] aMultiset.swap( std::multiset() );
This will create a new temporary empty multiset, which will swap with the multiset you wish to empty.