What are Iterators, C++?

前端 未结 5 407
孤城傲影
孤城傲影 2020-12-16 12:09

What are Iterators in C++?

5条回答
  •  情书的邮戳
    2020-12-16 13:04

    From p. 80 of Accelerated C++:

    An iterator is a value that

    • Identifies a container and an element in the container
    • Lets us examine the value stored in that element
    • Provides operations for moving between elements in the container
    • Restricts the available operations in ways that correspond to what the container can handle efficiently

提交回复
热议问题