C++ for Everyone, 1st Edition
Bug Report Page
How to Tell which Printing You Have
On the copyright page (facing the first page of the Preface), there is a
printing history of the book. The printing history is a row of numbers
that—at the 1st printing—looks like this:
10 9 8 7 6 5 4 3 2 1
At each subsequent printing, one number is removed from the end of this row of
numbers to indicate which printing of the book you have. For example, the last
number in the row of numbers in the 2nd printing is 2, and so on. In the list
below, [n] means that an error is fixed in the nth printing.
- [2] Page 77
- In Exercise P2.14, change “greater than or equal to 1,000”
to “between 1,000 and 999,999” and change “Please
enter an integer >= 1000:” to “Please enter an
integer between 1,000 and 999,999:”.
- Page 107
- In the fourth line of the table in Quality Tip 3.5, change
“10,400” to “104,000”.
- Page 138 Figure 1
- In the third block, “interest” should not be monospaced
- [2] Page 235
- In Exercise P5.24, delete “If n is even, then
an =
((an/2)2.”
- [2] Page 243
- Change the last sentence before the table to begin “Note that in
the loop condition the index is ...”
- Page 283 Exercise P6.20
- Remove “or if you are in the lower-right corner,”
Before “Decrement row”, add “Set row and column to
their previous value.”
- [2] Page 305
- In the next-to-last row of Table 4, remove the
;
after
strncat(t, s, n)
- [2] Page 329
- Change “Manual closing is only necessary if you want to open the
file again in the same program run.” to “Manual closing is
only necessary if you want to use the stream variable again to process
another file.”
- [2] Page 337
- In the next-to-last row of table 1, change 0...0 to 0...9
- [2] Page 361
- In Exercise P8.13, change the last sentence to read “Print the
total of all country populations (excepting the entry for “European
Union”)”.
- [2] Page 413
- In Exercise P9.19, change the member function “void
get_position()” to “double
get_position()”.
- [2] Page 414
- In Exercise P9.20, change “A constructor with a weight and an
x-position (the y-position is initially 0)” to “A constructor
with an x-position (the y-position is initially 0)”.
- Page 426 Self Check 8
- Change
string get_name();
to string get_name()
const;
- Page 429
- Change
int ChoiceQuestion::display() const
to void
ChoiceQuestion::display() const
(3x)
- [2] Page 477
- Change
istrstream
to istringstream
and
ostrstream
to ostringstream
Thanks to Cindy Johnson and (your name might go here) for their bug reports
and suggestions
Please report any remaining bugs in this edition on the bug report form.