Errata for Industrial Strength C++

by Mats Henricson and Erik Nyquist

Prentice Hall, ISBN 0-13-120965-5

Send additional errata to

Thanks to Kevlin Henney, Scott Meyers, Lars Petrus, Anders Sanne, Al Chou and Anders Wångby for helping us finding the glitches.

Page 11, first line

The word "will" should be "may".

Page 14

Insert this additional text before the text starting with "This means that we have a potential..."

A big problem is that even though there is a standard for how templates should be compiled, there are still many compilers that do not follow the standard. Some compilers require the complete template definition to be visible, even though that is not required by the standard.

Page 35-36, example 5.8

The declaration of p should be changed from:

char *p;
char p[100]; // must specify size

Page 46, example 6.3

Change the first two lines of this example from:

const unsigned large = 456789;
const int size = static_cast<int>(large);
unsigned large = 456789;
int size = static_cast<int>(large);

Page 62

Change the first paragraph from

This requires that the copy construtor returns a non-cont reference to an object of the class.
This requires that the copy assignment operator returns a non-const reference to an object of the class.

Page 63, example 7.9

Change the title of this example from:

const-declared parametersm
const-declared parameter

Page 73, example 7.17

The text incorrectly says max() is a member function - it is not. Remove the word "member" from the text.

Page 77, example 7.21

This example should be removed since old style access declaration only worked with non-public base classes.

Page 92-93, example 9.2

Replace the declaration of instanceM from:

static EmcSingleton* instanceM;
static auto_ptr<EmcSingleton> instanceM;

Page 131, example 12.3

The first comment on this page claims that operator new() throws bad_alloc. It should be operator new[].

Page 133, example 12.5


uncaught_ exception
should be

Page 133, example 12.5


void flush(); throw(CouldNotOpenFile);
should be:
void flush() throw(CouldNotOpenFile);

Page 145, example 12.13

The call to exit() may not always be appropriate for terminating the program, since it will completely bypass cleanup through the call of destructors for objects on the stack. Sometimes rethrowing the exception is a better choice, unless it was an utterly fatal exception, in which case it would be best to terminate as fast as possible by using either abort() or terminate() to bypass the call of all destructors.

Page 157

Unintentional line break on second paragraph.

Page 160, Rule 14.2

We no longer recommend you to follow rule 14.2. Most compilers of today have no problem with virtual destructors.

Page 164, Rule 15.2

Add an extra "to" so that it reads:

Do not depend on extensions to the language or to the standard library.

Page 173

The current list now contains 63 keywords, since "export" was recently added.

Page 189, example A.7

Remove the sentence:

Let's look at the list class in the standard library.

Page 198

The second "Chapter 3" should be "Chapter 4", and "Chapter 4" should be "Chapter 5".

Page 199

In Rec. 5.7, "this" should be in the monospaced font.

In Rule 5.9, "reference" should be "references".

Page 200

"Red. 7.4" should be "Rec. 7.4".

There should be a period at the end of the statement of Rule 7.11.

Page 201

In Rules 7.16 and 7.17, each occurrence of the "o-tilde" character should be an apostrophe instead.

Page 202

In Rec. 10.3, each occurrence of the "o-tilde" character should be an apostrophe instead.

In Rec. 10.6, "precondition" should be "preconditions".

Rec. 10.8 should read "derived class wherever a".

Page 203

In Rule 12.8, the "o-tilde" character should be an apostrophe instead.

In Rec. 12.15, "your" should be "you".

Page 204

In Rule 13.5, the "s" in "enums" should be in the body text font.

Rule 14.2 is incorrecly quoted from page 160. It should read:

When a public base class has a virtual destructor, each derived class should declare and implement a destructor.

In Rule 15.2, add an extra "to" so that it reads:

Do not depend on extensions to the language or to the standard library.

In Rec. 15.3, "an" should be "and".