您的位置:首页 > 编程语言 > C语言/C++

(原創) 为什么说iterator是left inclusive? (C/C++) (STL)

2006-11-15 23:20 387 查看
因为c.begin()是第一个element,但c.end()并不是最后一个element,而是one past the end,所以c.end()并不是iterator.

若以符号表示,则是
[first,last)
the range begin with first and ends with, but not include, last.

Reference
C++ Primer 4th P.314
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: