Errata

C++ The Core Language

Errata for C++ The Core Language

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page xvi
Obtaining Online Examples

Find examples at: http://examples.oreilly.com/9781565921160/

Anonymous   
Printed
Page xvi

Under the "FTP" heading, line 6 of the code used to read:

"Password: yourname@domain.name . . ."

Now reads:

"Password: 129
username@hostname . . ."

Anonymous    Jan 01, 2000
Printed
Page xvii

Under the "ftpmail" heading, line 3 of the code use to read:

"reply-to username@hostname.domainname . . ."

Now reads:

"reply-to username@hostname . . ."

Anonymous    Jan 01, 2000
Printed
Page xvii
Under the "BITFTP" heading, the first line of code use

to read:

"FTP ftp.uu.net NETDATA"

Now reads:

"FTP ftp.oreilly.com NETDATA"

Anonymous    Jan 01, 2000
Printed
Page xvii
Under the "BITFTP" heading, the third line of code use

to read:

"PASS myname@podunk.edu . . ."

Now reads:

"PASS username@hostname . . ."

Anonymous    Jan 01, 2000
Printed
Page xix
The following text was added to the preface

"How to Contact Us

We have tested and verified the information in this book
to the best of our ability, but you may find that features
have changed (or even that we have made mistakes!). Please
let us know about any errors you find, as well as your
suggestions for future editions, by writing to:

O'Reilly & Associates, Inc.
101 Morris Street
Sebastopol, CA 95472
1-800-998-9938 (in the U.S. or Canada)
1-707-829-0515 (international or local)
1-707-829-0104 (FAX)

You can send us messages electronically. To be put on the
mailing list or request a catalog, send email to:

info@oreilly.com

To ask technical questions or comment on the book, send
email to:

bookquestions@oreilly.com

We have a web site for the book, where we'll list examples,
errata, and any plans for future editions. You can access
this page at:

http://www.oreilly.com/catalog/9781565921160/

For more information about this book and others, see the
O'Reilly web site:

http://www.oreilly.com"

This addition of text threw off the page break for page xx.

Anonymous    Jan 01, 2000
Printed
Page 3
para. 4, line 1

"astraction" should be "abstraction"

Anonymous   
Printed
Page 15
next-to-last para.

The variable "d2" is declared twice in the same program.
the 2nd one should be d3

Anonymous   
Printed
Page 15
last para.

"initialize d2 ad d3" should be "initialize d2 and d3".

Anonymous   
Printed
Page 21
2nd example code

On the 2nd and 3rd comment lines, global1 should read global2 and global3
respectively.

Note from the Author or Editor:
The three lines could say global1, global2, and global3, respectively, or they could all say global, as in "init of a global."

Anonymous   
Printed
Page 49
3rd Sentence of 2nd Paragraph

If we implemented IntStack with a linked list, the iterator would contain a pointer to the current element "instead of a count"

This should read "instead of an index of the current item in the stack".

The book provides a very good approach to learning the language. I have found it to be very useful in gaining clear and concise insight into the basic structure of the language. Beginning with a knowledge of the "C" programming language, it offers a very efficient elaboration of the most pertinent details, (of C++) from which more
detailed study can form its basis. Of all the books reviewed, this book permits C++ to be understood the most quickly. I really needed a book such as this one so that I can form the basic categories to store the huge amount of details associated with learning this language.
Great Job !!!

Note from the Author or Editor:
I agree.

Anonymous   
Printed
Page 60
para. 2, line 2: "pia" changed to "psia" (still in constant width.)

Anonymous    May 01, 1997
Printed
Page 66
2nd para. (not incl. code)

This "minor technical mistake" is a publishing error, not an error in C++.
The word "member" is in mono-spaced font when it should be in the normal font

Anonymous   
Printed
Page 109
Fourth line of code in advanced topic box

There is an extra comma after the last item in the member initialization list:

frameThickness(source.frameThickness), // data member

should read:

frameThickness(source.frameThickness) // data member

Anonymous   
Printed
Page 123
para. 4, lines 2-3: "printer member function operator <<()"

changed to "printer operator operator<<()" ("operator<<()" is still
in constant width.)

Anonymous    May 01, 1997
Printed
Page 125
2/3 the way down the page

void Id::operator=(Id src) {
should be
void Id::operator=(Id &src) {

if (this == ) return; // don't assign to self
should be
if (this == &src) return; // don't assign to self

Id::Id(Id src) {
should be
Id::Id(Id &src) {

Anonymous   
Printed
Page 125
code for operator

void Id::operator=(Id &src) {
deleteVal();
newVal(src.value);
}

Has been changed to:

void Id::operator=(Id &src) {
if (this == &src) return; // don't assign to self
deleteVal();
newVal(src.value);
}

Anonymous    Sep 01, 2001
Printed
Page 129
the code block at the top of the page

void Id::operator=(Id src) {
should be
void Id::operator=(Id &src) {

Id::Id(Id src) {
should be
Id::Id(Id &src) {

Anonymous   
Printed
Page 129
code in the middle of the page

*os "Id{" data "-->";
should be
*os << "Id{" << data << "-->";

*os "(null)";
should be
*os << "(null)";

*os *data";
should be
data->print(os);


To get the same output like the end of this page,
we should modify the original print function to:

void IdData::print(ostream *os)
{
*os << "IdData{" << value << ", refCount = " << refCount << '}';
}


Anonymous   
Printed
Page 129
2nd paragraph

The printing operator operator() is identical to what you've....
should be
The printing operator operator<<() is identical to what you've....

Anonymous   
Printed
Page 129
Last but one para in the Id::set function

void Id::set(char *idStr)
{
if ( data->refCount > 1 )
attachData(0);
data->set(idStr);
}

should read:

void Id::set(char *idStr)
{
if ( data->refCount > 1 )
{
detachData();
attachData(0);
}
data->set(idStr);
}

NOTE: This has been corrected in the current version.

Anonymous   
Printed
Page 129
code for set

void Id::set(char *idStr) {
if (data->refCount > 1)
attachData(0);
data->set(idStr);
}

Has been changed to:

void Id::set(char *idStr) {
if (data->refCount > 1) {
detachData();
attachData(0);
}
data->set(idStr);
}

Anonymous    Sep 01, 2001
Printed
Page 129
example printout at bottom of page

id1 = Id{0x22640-->IdData{0, refCount = 2}}
id2 = Id{0x22660-->IdData{0, refCount = 2}}
id1 = Id{0x22640-->IdData{12345, refCount = 1}}
id2 = Id{0x22640-->IdData{12345, refCount = 2}}

Has been changed to:

id1 = Id{0x22640-->IdData{0, refCount = 2}}
id2 = Id{0x22640-->IdData{0, refCount = 2}}
id1 = Id{0x22660-->IdData{12345, refCount = 1}}
id2 = Id{0x22660-->IdData{12345, refCount = 2}}

Anonymous    Sep 01, 2001
Printed
Page 140
last paragraph

'We've also changed anArray.getElem(5).sanitize to ...'
should be:
'We've also changed anArray.getElem(5).sanitize() to ...'

Anonymous   
Printed
Page 152
3rd paragraph

Third line down, there is a comma that should be a period.

...being invoked, If you are invoking...
should read
...being invoked. If you are invoking...

Anonymous   
Printed
Page 200
last para.

"It`s also good idea" should be "It`s also a good idea".

Anonymous   
Printed
Page 209
About the Authors: para. 2 changed to

"Doug Brown is a consultant/contractor in Beavertown, Oregon. He has
been developing software for circuit simulation, synthesis, and testing
since 1977. Doug coauthored lex & yacc, another O'Reilly & Associates
Nutshell Handbook. He received an M.S. in electrical engineering from
the Univeristy of Illinois at Urbana-Champaign in 1976."

Anonymous    May 01, 1997
Printed
Page 210
added the following to the end of the next-to-last para

Whenever possible, our books use RepKover (tm), a durable and flexible
lay-flat binding. If the page count exceeds RepKover's limit, perfect
binding is used.

Anonymous    Mar 01, 1998