Overview
Templates are a mechanism for writing algorithmic patterns that can be applied to a wide variety of different data types.
Iterators are a data abstraction for the notion of a position within a container of data. Iterators allow us to express many simple algorithms in a simple form, regardless of whether the underlying container is an array, a linked list, a tree, or some other data structure.
Templates and iterators are often used together to provide patterns for code that can be applied to a wide range of underlying data structures.
Read: Algorithms as Patterns for Code
Read: Function Templates
Read: Class Templates
Read: The Standard Library: Overview
Read: Iterators: an ADT for Positions
Watch Working with Iterators
Do: Lab: Working with Iterators & Templates