Practical Object-Oriented Development in C++ and Java

Bug Report Page

Known Bugs

Page xi
Change to
Page 24
Change "Writing the code to implement templates is not easy; we will cover the details in Chapter 14" to "Writing the code to implement templates is not easy; we will cover the details in Chapter 15"
Page 25
Change "For example, vector<double> a; defines an array of 10 floating-point numbers" to ""For example, vector<double> a(10); defines an array of 10 floating-point numbers""
Page 27
Change String s = "Hello, World"; to string s = "Hello, World"; and String filename to string filename (i.e. lowercase s)
Page 31 and 34
In the binom function, replace n- with n--.
Page 38
Change include <fstream> to #include <fstream>
Page 43
Change "The corresponding code in C will not compile." to "The corresponding code in C++ will not compile."
Change #define square(x) (x)*(x)) to #define square(x) ((x)*(x)) (that is, add a parenthesis)
Page 52
Change "We will define inline functions" to "We will not define inline functions"
Page 56 line 4 from bottom
Change "the C compiler " to "the C++ compiler"
Page 69 middle of page
Change ": date_date" to "date - date"
Page 88 Figure 5.4
Change receive greeting to receive message
Page 104 Caption for Figure 5.18
Replace "Booch diagram" with "UML diagram"
Page 147
Page 154 and 159
Replace string _text with string _message. (This also should be changed in shapes.cpp in the companion code.)
Page 156 Figure 7.16
Replace _text with _message.
Page 333
Change : _buffer(g), ostream(&buffer) to : _buffer(g), ostream(&_buffer) (i.e. add _ before buffer)
Page 410
The text and figure give the impression that an auto_ptr that no longer owns the object is set to NULL. Sadly, that is not the case. It retains its old value, which quietly becomes a bad pointer when the new owner is destroyed.
  1. Change "the smart pointer pe contains only a NULL pointer" to "the smart pointer pe contains a pointer to a deleted memory block"
  2. In the figure, add owns: true inside the first rectangle on the left labeled p and inside the fourth rectangle on the left labeled q
  3. In the figure, change NULL to owns: false
Page 411
Remove the lines
const X& operator*() const
const X* operator->() const
It doesn't make sense to make this distinction for a const rc_ptr<X>. It would make sense to introduce a separate typerc_const_ptr<X> instead.
Back cover
Change "C++ Reports" to "C++ Report"
Wiley web site
The table of contents does not match the actual table of contents of the book. According to my editor: "I suspect the only way to make them match at this point is if both were revised."

Thanks to Stephen Arndt, J. Cross, Anders Erlander, Edward Fron, Paul Gallivan, Luke T. Gatchell, R. Kuramoto, Konstantin Laufer, Hai Le, Allen Walker and a number of anonymous contributors for their bug reports!

Please report any remaining bugs in this edition on the bug report form.