Compartir a través de


hash_multimap::cbegin

Nota

Esta API está obsoleta.La alternativa es unordered_multimap (Clase).

Devuelve un iterador const que dirige el primer elemento del hash_multimap.

const_iterator cbegin( ) const;

Valor devuelto

Un iterador bidireccional const que dirige el primer elemento de hash_multimap (Clase) o la ubicación que funciona correctamente hash_multimapvacío.

Nota

Con el valor devuelto de cbegin, el objeto de hash_multimap no puede modificarse.

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_multimap_cbegin.cpp
// compile with: /EHsc
#include <hash_multimap>
#include <iostream>

int main( )
{
   using namespace std;
   using namespace stdext;
   hash_multimap <int, int> hm1;

   hash_multimap <int, int> :: const_iterator hm1_cIter;
   typedef pair <int, int> Int_Pair;

   hm1.insert ( Int_Pair ( 2, 4 ) );

   hm1_cIter = hm1.cbegin ( );
   cout << "The first element of hm1 is " 
        << hm1_cIter -> first << "." << endl;
   }
  

Requisitos

Encabezado: <hash_map>

Espacio de nombres: stdext

Vea también

Referencia

hash_multimap (Clase)

Biblioteca de plantillas estándar