CS 70

Lesson 2: Iterators and More

  • LHS Cow speaking

    Today we'll explore a new idea: iterators.

  • RHS Cow speaking

    And see some other ideas that make writing code in C++ a lot easier.

This lesson will address the following learning goals from Group 6:

  • 6A (Iterator Definition): Explain what iterators are and why they are useful.
  • 6B (Using Iterators): Read and write C++ code using the standard C++ iterator idiom, including const iterators and const_iterators.
  • 6C (Iterator Interface) Explain the required outcomes of begin, end, and iterator operations in the C++ iterator interface.

Outline

We'll look at something a bit different next, before coming back to what we've just seen.

With that bit of syntax learned, back to the main event…

A good point to let it all sink in.

To receive credit: complete all pages above, then this page will be complete as well (and get a green check emoji at the bottom right of the page).

(When logged in, completion status appears here.)