Big C++
Bug Report
Page
- Page 59
- Change ln(x) to loge(x) and lg(x) to log10(x)
- Page 62
- Change −7 + 4 − 4 = 1 to −7 + 4 + 4 = 1.
- Page 69
- Change "the pow and root functions must be used" to
"the pow and sqrt functions must be used"
- Page 76
- In Exercise 2.18, change “if |x| > 0” to
“if x > 0” and “if |x| < 0”
to “if x < 0”.
- Page 78
- Below the line #include <iostream>, add a line
#include <cmath>
- Page 125
- In Common Error 4.2, add absolute value | | around x -
y in the second equation.
- Page 164
- Add a line
#include <cmath>
at the top of approx.cpp
- Page 202
- Change
jul = jul + 1 + jalpha - 0.25 * jalpha;
to
jul = jul + 1 + jalpha - (int)(0.25 * jalpha);
- Page 229
- Change
void Employee::set_salary(double new_salary) const
to
void Employee::set_salary(double new_salary)
- Page 242
- Change
void remove_message(int i) const;
to
void remove_message(int i);
- Page 266 Common Error 7.3
- Change "To make the semicolon really stand out, place it on a line by
itself, as in the first example." to "You can avoid this error by using
an empty block { } instead of an empty statement." (The old
advice was correct, but the replacement is an improvement. Thanks to
Michael Beeson for pointing this out.)
- Page 324
- Change "There is no C++ standard library function to compute the arc
sine. For" to "The standard library function asin computes the
arc sine. However, for".
- Page 429 Exercise R11.7
- Change B::B() to B::B() { }
- Page 608
- Change
double x = 2.5 * a; // Should convert fraction to double
to
double x = c.toDouble(); // implicit operator
double() can cause overload ambiguities
- Page 609
- Change line 58 to double toDouble() const;
- Page 613
- Change line 159 to double Fraction::toDouble() const
- Page 644
- In Exercise P17.7, change "addition, subtraction, comparison" to
"addition, subtraction, multiplication".
- Page 645
- In Exercise P17.13, change price to prices
(2x).
- Page 828
- Change "Has performed only 29 assignments" to "Has performed only 27
assignments". In Table 2, change the entries in row 4 column 4 from 3 to
2, and in row 5 column 4 from 2 to 1. That is, column 4 should be changed
from 1 3 4 1 5 1 1 1 9 1 1 1 to 1 2
3 1 5 1 1 1 9 1 1 1
- Page 863
- In Exercise P23.2, change "the same analysis for 25 operations" to "the
same analysis for 12
operations"
- Page 974
- In Exercise P26.6, remove the sentence "Set the buffer in the
constructor, using the rdbuf(streambuf*) function."
- Page 974
- In Exercise P26.10, change "Common Error 26.1 outlines a sorter..." to
"Common Error 26.2 outlines a
sorter..."
- Page 979 and all sample programs in Ch. 26
- With newer versions of wxWidgets, the frame should never be initialized
in the constructor. It should always be initialized in OnInit:
bool BasicApp::OnInit()
{
frame = new wxFrame(NULL, -1, "My First GUI Program");
frame->Show(true);
return true;
}
- Page 1082
- In the entry for Infinity, change "mantissa = 0" to "mantissa =
±0". In the entry for NaN, change "mantissa ≠
10...0" to "mantissa ≠ ±0"
Thanks to Love Angel, David Ardia, Mehmet Canayaz, David L. Clark, Jason
James, John Christopher Jones, Veit Hailperin, Michael Jepson, Bill
Stockwell, Jørgen Villadsen, and (your name might go here) for their
help!
Please report any remaining bugs in this edition on the bug report form.