什么是迭代器

来源:互联网 发布:linux多进程与共享库 编辑:程序博客网 时间:2024/06/11 12:05

迭代器允许程序员来遍历容器的元素,而不需要考虑其具体实现。

iterator

An iterator is an object that allows a programmer to traverse through all the elements of a collection without considering its specific implementation.

 

原创粉丝点击