Sdílet prostřednictvím


hash_multiset::clear

[!POZNÁMKA]

Toto rozhraní API je zastaralé.Alternativou je unordered_multiset – třída.

Vymaže všechny prvky hash_multiset.

void clear( );

Poznámky

V aplikaci Visual C++ .NET 2003, členové hlavičkových souborů tříd <hash_map> a <hash_set> již nejsou v oboru názvů std, ale byly přesunuty do oboru názvů stdext.Další informace naleznete v tématu Obor názvů stdext.

Příklad

// hash_multiset_clear.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>

int main( )
{
   using namespace std;
   using namespace stdext;
   hash_multiset <int> hms1;
   
   hms1.insert( 1 );
   hms1.insert( 2 );

   cout << "The size of the hash_multiset is initially " << hms1.size( )
        << "." << endl;

   hms1.clear( );
   cout << "The size of the hash_multiset after clearing is " 
        << hms1.size( ) << "." << endl;
}
  

Požadavky

Záhlaví:<hash_set>

Obor názvů: stdext

Viz také

Referenční dokumentace

hash_multiset – třída

Standardní knihovna šablon