Answers for "remove from unordered_set c++"

C++
1

remove from unordered_set c++

// By position:	iterator erase ( const_iterator position );
// By key:		size_type erase ( const key_type& k );
// By range:	iterator erase ( const_iterator first, const_iterator last );

myset.erase ( myset.begin() );                    // erasing by iterator
myset.erase ( "France" );                         // erasing by key
myset.erase ( myset.find("Japan"), myset.end() ); // erasing by range
Posted by: Guest on April-26-2020

Browse Popular Code Answers by Language