O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reuse in C++ Programming

Of course, the template mechanism, the Standard Template Library, the classes, and other object-oriented principles that underpin C++ make it the perfect platform for reuse. All programmers should make use of the STL, as it contains tried-and-tested objects, containers, and algorithms.

From the implementation side, you have the same facilities as C programmers; with the added bonus that the class hierarchy mechanism gives you a better platform for it. In other words, where the C code needs to be forever extended with new functionality to solve a new problem with existing code, a class can be derived from a base class.

The derived class can then be specialized for a given application, with only the required code passing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required