Check out example codes for "remove from unordered_set c++". It will help you in understanding the concepts better.

Code Example 1

// 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

Learn ReactJs, React Native from akashmittal.com