Lecture 6 - Slide 6 : 40
Insert iterators

Many algorithms overwrite existing elements

It is also necessary to be able to insert new elements

Insertion is normally done by the container operations push_back(), push_front(), and insert()

Insertion can also be accomplished via insert-iterators, which are output iterators

Using these, assignments are used for insertion of new elements

Insertion iterators can be created by the template (factory) functions back_inserter, front_inserter, and inserter.

ins-2.cpp
Output insert-iterators and factory functions that create such iterators.
ins-2.cpp
Same program - simplified in various ways in C++11.