STL Iterators Exercises

  < Previous  Next >
  1. Discuss with your neighbor(s) what a STL iterator is and why we want to use them.
  2. Write a complete C++ program that:
    1. Reads in integers from STDIN (until a non-integer is entered) and stores them into a vector
    2. Print out how many numbers are in the vector (using a vector method if possible)
    3. Uses an iterator to print out the numbers in the container

Last Modified: