Review

We started this chapter by creating a new xstring class based on the standard library string class, so that we could add some new functionality to the home inventory program. Before we started to examine the functions in this class, the first new construct we encountered was the 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 usually physically part of the compiler. ...

Get C++: A Dialog Programming with the C++ Standard Library 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.