hash_multiset::cbegin

备注

此 API 已过时。替代为 unordered_multiset 类

返回解决在 hash_multiset 的第一个元素的 const 迭代器。

const_iterator cbegin( ) const;

返回值

解决 hash_multiset 类 中的第一个元素或位置的 const 双向迭代器成功的空 hash_multiset。

备注

返回值 cbegin,不能修改 hash_multiset 对象中的元素。

在Visual C++ .NET 2003中,成员<hash_map><hash_set> 头文件不再在std命名空间,而是已经进入了stdext命名空间。 有关更多信息,请参见 stdext 命名空间

示例

// hash_multiset_cbegin.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_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;
}
  

要求

Header: <hash_set>

**命名空间:**stdext

请参见

参考

hash_multiset 类

标准模板库