hash_multimap::cbegin
[!UWAGA]
Ten interfejs API jest nieaktualny.Alternatywą jest unordered_multimap — Klasa.
Zwraca wartość sterująca const, adresowania pierwszym elementem hash_multimap.
const_iterator cbegin( ) const;
Wartość zwracana
Const sterująca dwukierunkowy adresowania pierwszym elementem w hash_multimap — Klasa lub lokalizacji kolejnego pustego hash_multimap.
Uwagi
Z zwraca wartość z cbegin, hash_multimap nie można modyfikować obiektu.
W Visual C++ .NET 2003, elementy członkowskie plików nagłówka <hash_map> i <hash_set> nie są już w przestrzeni nazw std, ale raczej zostały przeniesione do przestrzeni nazw stdext.Zobacz Przestrzeń nazw stdext, aby uzyskać więcej informacji.
Przykład
// 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;
}
Wymagania
Nagłówek: <hash_map>
Przestrzeń nazw: stdext