다음을 통해 공유


hash_multimap::cend

Note

This API is obsolete. The alternative is unordered_multimap Class.

Returns a const iterator that addresses the location succeeding the last element in a hash_multimap.

const_iterator cend( ) const;

Return Value

A const bidirectional iterator that addresses the location succeeding the last element in a hash_multimap Class. If the hash_multimap is empty, then hash_multimap::cend == hash_multimap::begin.

Remarks

cend is used to test whether an iterator has reached the end of its hash_multimap.

The value returned by cend should not be dereferenced.

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_cend.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 ( 3, 30 ) );

   hm1_cIter = hm1.cend( );
   hm1_cIter--;
   cout << "The value of last element of hm1 is " 
        << hm1_cIter -> second << "." << endl;
   }
The value of last element of hm1 is 30.

Requirements

Header: <hash_map>

Namespace: stdext

See Also

Reference

hash_multimap Class

Standard Template Library