主题:【请教】 请哪位大虾简要介绍一下STL中几种iterator -- 东方射日
helps:
You usually don't need to pay attention to the iterators unless you are writing generic libraries.
In the STL, iterators connect algorithms to containers, behind the scene. As suggested by their names, iterator types differ in their capability.
If what you do is writing applications, knowing the capability of containers and algorithms is more important and adequate most of time.
If you are writing libraries, say developing a new algorithm, or a new kind of container, that's another story. Because, as aforementioned, iterators enable algorithms to be used on containers generically, you'd have to know precisely how one kind of iterator is different from another to make your new algorithm or new container generic.
- 相关回复 上下关系3
🙂【请教】 请哪位大虾简要介绍一下STL中几种iterator 东方射日 字209 2007-01-04 15:09:11
🙂我从"STL Programming Guide"摘录些你看看. 1 老河 字1929 2007-01-09 21:17:02
🙂Not an expert... but hope this