hash_multiset::cbegin
Returns a const iterator that addresses the first element in the hash_multiset.
const_iterator cbegin( ) const;
Return Value
A const bidirectional iterator addressing the first element in the hash_multiset Class or the location succeeding an empty hash_multiset.
Remarks
With the return value of cbegin, the elements in the hash_multiset object cannot be modified.
In Visual C++ .NET 2003, members of the <hash_map> and <hash_set> header files are no longer in the std namespace, but rather have been moved into the stdext namespace. See The stdext Namespace for more information.
Example
// hash_multiset_cbegin.cpp
// compile with: /EHsc
#define _DEFINE_DEPRECATED_HASH_CLASSES 0
#include <hash_multiset>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multiset <int> hs1;
hash_multiset <int>::const_iterator hs1_cIter;
hs1.insert( 1 );
hs1.insert( 2 );
hs1.insert( 3 );
hs1_cIter = hs1.cbegin( );
cout << "The first element of hs1 is " << *hs1_cIter << endl;
}
The first element of hs1 is 1
Requirements
Header: <hash_set>
Namespace: stdext