hash_multimap::crbegin
Returns a const iterator addressing the first element in a reversed hash_multimap.
const_reverse_iterator crbegin( ) const;
Return Value
A const reverse bidirectional iterator addressing the first element in a reversed hash_multimap Class or addressing what had been the last element in the unreversed hash_multimap.
Remarks
crbegin is used with a reversed hash_multimap just as hash_multimap::begin is used with a hash_multimap.
With the return value of crbegin, the hash_multimap object cannot be modified.
crbegin can be used to iterate through a hash_multimap backwards.
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_multimap_crbegin.cpp
// compile with: /EHsc
#define _DEFINE_DEPRECATED_HASH_CLASSES 0
#include <hash_multimap>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multimap <int, int> hm1;
hash_multimap <int, int> :: const_reverse_iterator hm1_crIter;
typedef pair <int, int> Int_Pair;
hm1.insert ( Int_Pair ( 3, 30 ) );
hm1_crIter = hm1.crbegin( );
cout << "The first element of the reversed hash_multimap hm1 is "
<< hm1_crIter -> first << "." << endl;
}
The first element of the reversed hash_multimap hm1 is 3.
Requirements
Header: <hash_map>
Namespace: stdext