hash_multiset::crend

说明说明

此 API 已过时。另一种方法是 unordered_multiset Class

返回解决成功最后一个元素的位置已取消的 hash_multiset 的常量迭代器。

const_reverse_iterator crend( ) const;

返回值

解决成功最后一个元素的位置。是相反的 hash_multiset Class 的常量反转双向迭代器 (在前面 unreversed hash_multiset的第一个元素) 的位置。

备注

hash_multiset::end 使用 hash_multiset,crend 用于取消的 hash_multiset。

crend的返回值,就不能修改 hash_multiset 对象。

crend 可用于测试对反向迭代器是否已到达其 hash_multiset 的末尾。

在 Visual C++ .NET 2003 中,<hash_map><hash_set> 标头文件的成员中不再标准,命名空间,而是将 stdext 命名空间。有关更多信息,请参见 stdext 命名空间

示例

// hash_multiset_crend.cpp
// compile with: /EHsc
#include <hash_multiset>
#include <iostream>

int main( )
{
   using namespace std;
   using namespace stdext;
   hash_multiset <int> hs1;
   hash_multiset <int>::const_reverse_iterator hs1_crIter;

   hs1.insert( 10 );
   hs1.insert( 20 );
   hs1.insert( 30 );

   hs1_crIter = hs1.crend( );
   hs1_crIter--;
   cout << "The last element in the reversed hash_multiset is "
        << *hs1_crIter << "." << endl;
}
  

要求

标头: <hash_multiset>

命名空间: stdext

请参见

参考

hash_multiset Class

标准模板库