20.5 Nested Classes (cont.)
- Does not imply that a List object contains an
Iterator object
- The name Iterator is in the scope of the List
class
- List member functions can refer to it simply as
Iterator
- All other functions refer to it as List::Iterator
- Nested classes need not be public
- Declaring nested class as private encapsulates entire
definition
- May only be created by members of outer class
prev
|top
|next