Home Segments Index Top Previous Next

781: Mainline

Defining the iterator constructor is not quite so simple. That constructor must get to the first link in a list by moving through the header object that is handed over as an argument in statements such as this:

 *-- Template class name 
 |        *-- Template argument for template class 
 |        |             *-- Name of new iterator            
 |        |             |               *-- Header object 
 |        |             |               | 
 v        v             v               v 
iterator train_iterator (train);