Introduction to OOP Chapter 19: Container Classes : next previous audio real text

A Third Alternative, Generics

Generics, as we described in the last chapter, are a third approach.
template <class T> class List {
	void	addElement (T newValue);
	T	firstElement ();

	Link * firstLink;

	private class Link { // nested class
		T	value;
		Link *	nextLink;

		Link (T v, Link * n) : value(v), nextLink(n) { }
Allow for both strong typing and reuse.
Intro OOP, Chapter 19, Slide 11