hash_multimap::const_iterator
![]() |
---|
這個 API 已經過時。這個選項是 unordered_multimap Class。 |
提供雙向 Iterator 可讀取 hash_multimap 的一個 const 元素的型別。
typedef list<typename Traits::value_type, typename Traits::allocator_type>::const_iterator const_iterator;
備註
型別 const_iterator 不能用來修改項目的值。
hash_multimap 點所定義 const_iterator 對 value_type物件,是型別 pair*<constKey, Type>*。 索引鍵的值將第一個成員為可用的,因此,這個對應之項目的值傳遞至的第二個成員是可用的。
若要解除 const_iterator 指向在 hash_multimap 的項目的 cIter ,請使用 -> 運算子。
存取索引鍵值為項目,使用 cIter - > first,相當於cIter(*)。first。 存取對應的基準值為項目,使用 cIter - > second,相當於cIter(*)。first。
在 Visual C++ .NET Pocket PC, <hash_map> 和 <hash_set> 標頭檔 (Header File) 的成員不在 std 命名空間,,而是移至 stdext 命名空間。 如需詳細資訊,請參閱 stdext 命名空間。
範例
使用 const_iterator,為範例的 啟動 參閱範例。
需求
標題: <hash_map>
命名空間: stdext