multimap::const_iterator
提供雙向 Iterator 可讀取多重對應的一個 const 元素的型別。
typedef implementation-defined const_iterator;
備註
const_iterator 型別無法用來修改項目的值。
in value_type物件的多重對應所指定的 const_iterator ,是 pair*<const Key, [型別]>。* 索引鍵的值到第一個成員為可用,而且這個對應之項目的值傳遞給第二個成員是可用的。
若要解除參考 const_iterator 指向在多重對應的項目的cIter ,請使用 -> 運算子。
存取索引鍵值項目、使用 cIter ->first的,相當於cIter(*)。first。 存取對應的資料值項目、使用 cIter ->second的,相當於cIter(*)。second。
範例
使用 const_iterator,中的參閱 啟動 範例。
需求
標頭:<map>
命名空間: std