hash_multiset::clear
![]() |
---|
Esta API está obsoleta.La alternativa es unordered_multiset (Clase). |
Borra todos los elementos de un hash_multiset.
void clear( );
Comentarios
En Visual C++ .NET 2003, los miembros de los archivos de encabezado <hash_map> y <hash_set> ya no están en el espacio de nombres std, sino que se han movido al espacio de nombres stdext. Vea El espacio de nombres stdext para obtener más información.
Ejemplo
// 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;
}
Requisitos
Encabezado: <hash_set>
Espacio de nombres: stdext