hash_set::crbegin

说明说明

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

返回解决常数的迭代器已取消的 hash_set 的第一个元素。

const_reverse_iterator crbegin( ) const;

返回值

解决 const 反转双向的迭代器解决在取消的 hash_set Class 的第一个元素或什么是在 unreversed hash_set的最后一个元素。

备注

hash_set::begin 使用 hash_set,crbegin 使用具有是相反的 hash_set。

crbegin的返回值,就不能修改 hash_set 对象。

crbegin 可用于通过 hash_set 向后重复。

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

示例

// hash_set_crbegin.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>

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

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

   hs1_crIter = hs1.crbegin( );
   cout << "The first element in the reversed hash_set is "
        << *hs1_crIter << "." << endl;
}
  

要求

标头: <hash_set>

命名空间: stdext

请参见

参考

hash_set Class

标准模板库