Introduction to OOP | Chapter 19: Container Classes : | next | previous | audio | real | text |
template <class T> class List { public: void addElement (T newValue); T firstElement (); private: LinkAllow for both strong typing and reuse.* firstLink; private class Link { // nested class public: T value; Link * nextLink; Link (T v, Link * n) : value(v), nextLink(n) { } }; };