Review

We started this chapter by improving the string class that we created in Chapters 7 and 8, so that we could add some new functionality to the home inventory program. Before we added any new functions to this class, the first modification we made was to add an include guard, which is a means of preventing the C++ compiler from seeing the same class definition more than one time for a given source code file. Implementing the include guard required us to look at some very old parts of C++ dating back to the early days of C: the preprocessor and its preprocessor symbols. The preprocessor was originally a separate program that was executed before the compiler itself, but nowadays it is often physically part of the compiler. Most of its features ...

Get Learning to Program in C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.