共用方式為


hash_multiset::cbegin

注意事項注意事項

這個 API 已經過時。這個選項是 unordered_multiset Class

傳回定址。hash_multiset 的第一個項目的 const Iterator。

const_iterator cbegin( ) const;

傳回值

const 定址的雙向 Iterator 為 null hash_multiset的 hash_multiset Class 的第一個項目或位置。

備註

傳回值 cbegin,無法修改 hash_multiset 物件的項目。

在 Visual C++ .NET Pocket PC, <hash_map><hash_set> 標頭檔 (Header File) 的成員不在 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;
}
  

需求

標題: <hash_set>

命名空間: stdext

請參閱

參考

hash_multiset Class

標準樣板程式庫