討論串c++ 的iteraotor
共 4 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 3→)留言4則,0人參與, 最新作者xuchuan (xuchuan)時間17年前 (2008/08/25 16:08), 編輯資訊
0
0
0
內容預覽:
nth_element和partial_sort都要求random access iterator,而map的iterator是. bidirectional,不能用。. iterator一共是五種:input,output,forward,bidirectional,random access.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者xuchuan (xuchuan)時間17年前 (2008/08/25 16:03), 編輯資訊
0
0
0
內容預覽:
用rbegin(),rend(),這兩個是從後往前的. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 221.218.193.92.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者xrancyma.時間17年前 (2008/08/25 09:01), 編輯資訊
0
0
0
內容預覽:
引述《sorryChen.bbs@ptt.cc (陳揚和)》之銘言:. > 先說是個笨問題... > it++ 可以 it-- 倒退好像就不行 對嗎. > 我是說像是map中的iterator,內部是遞增排列的吧. > 但其實每次都想要拿最大的那幾個...有辦法比較快拿到嗎. 1. 曳代器有分
(還有41個字)

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者sorryChen (陳揚和)時間17年前 (2008/08/25 06:16), 編輯資訊
0
0
0
內容預覽:
先說是個笨問題... it++ 可以 it-- 倒退好像就不行 對嗎. 我是說像是map中的iterator,內部是遞增排列的吧. 但其實每次都想要拿最大的那幾個...有辦法比較快拿到嗎. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 128.125.87.33.
首頁
上一頁
1
下一頁
尾頁