Introduction to OOP: Chapter 15 : Case Study: Container Classes [next] [previous] [audio] [real] [text]

Using The List Class

Using the list class involves explicitly creating links.

List aList;

aList.Add(new DoubleLink(2.71828));
aList.Add(new DoubleLink(1.61803));
aList.Add(new DoubleLink(3.14159));

DoubleLink * pi;

pi = (DoubleLink *) aList.First();
aList.RemoveFirst();
Intro OOP, Chapter 15, Slide 9