hash_multiset::begin
[!NOT]
Bu API artık kullanılmıyor.Alternatif unordered_multiset Class.
Hash_multiset ilk öğe gideren bir yineleyici döndürür.
const_iterator begin( ) const;
iterator begin( );
Dönüş Değeri
İlk öğe hash_multiset veya boş bir hash_multiset izleyen konum adresleme çift yönlü Yineleyici.
Notlar
Dönüş değerini başlayan için atanan bir const_iterator, hash_multiset nesnesi içindeki öğeler değiştirilemez.Dönüş değerini başlamak atanmış bir Yineleyici, hash_multiset nesnesi içindeki öğeleri değiştirilebilir.
Visual C++ .NET 2003, üyeleri de <hash_map> ve <hash_set> başlık dosyaları artık std ad alanında bulunan, ancak bunun yerine stdext ad alanına taşınmış.Bkz: ad stdext daha fazla bilgi için.
Örnek
// hash_multiset_begin.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multiset <int> hms1;
hash_multiset <int>::iterator hms1_Iter;
hash_multiset <int>::const_iterator hms1_cIter;
hms1.insert( 1 );
hms1.insert( 2 );
hms1.insert( 3 );
hms1_Iter = hms1.begin( );
cout << "The first element of hms1 is " << *hms1_Iter << endl;
hms1_Iter = hms1.begin( );
hms1.erase( hms1_Iter );
// The following 2 lines would err because the iterator is const
// hms1_cIter = hms1.begin( );
// hms1.erase( hms1_cIter );
hms1_cIter = hms1.begin( );
cout << "The first element of hms1 is now " << *hms1_cIter << endl;
}
Gereksinimler
Başlık: <hash_set>
Ad alanı: stdext