April 2011
Beginner
624 pages
11h 34m
English
If you’ve stayed with me through the last three chapters—I call them “object-oriented boot camp”—then congratulations! I’ve taken you through a number of the subtleties of writing C++ classes, complete with constructors and operator functions.
But now it’s time to have some fun with classes! In this chapter, we’ll use classes to implement a customized linked list and to animate the Tower of Hanoi puzzle solution from Chapter 4.
We’ve been able to use arrays to do quite a lot. With dynamic memory allocation, arrays can even be given a size determined at runtime. But there are still limitations: Once fixed, the length of an array can’t be changed without destroying the array and starting over. ...
Read now
Unlock full access