Errata
Please excuse any inconveniences they
have caused.
Corrections to the first printing of the second edition
- Page 50
- Line 6 from bottom replace "$55.0" with
"$55.50"
- Page 97
- Exercise 2.15(k) replace "Avg__cost"
with "Avg_cost"
- Exercise 2.17(e) replace "i5' with
"i3"
- Page 100
- Exercise 2.34 line 1 replace "its" with
"it's"
- Page 101
- Add to key concepts to list "strings"
and "EzWindows"
- Page 120
- Line 6 replace "Please enter"
with "Enter"
- Line 16 replace "Stuff" with
"Stuff!"
- Page 124
- Line 9 from bottom replace "Date.size() -
1;" with Date.size();"
- Page 125
- Line 9 from bottom replace "W.Open()"
with "W.Open();"
- Page 130
- Line 10 from bottom replace "Time to
cut" with "Approximate time to
cut"
- Line 15 from bottom replace "yard" with
"lawn"
- Line 16 from bottom replace "yard" with
"lawn"
- Page 131
- Line 6 from bottom replace "The
statement" with "The following
statement"
- Page 132
- Line 7 replace "Time to cut" with
"Approximate time to cut"
- Page 134
- Line 2 from bottom replace "Time to
cut" with "Approximate time to
cut"
- Page 142
- Exercise 3.8.(m) replace "143F" with
"0x143F"
- Line 175
- Line 7 from top of aside box replace
"rap" with " rap"
- Line 6 from bottom of the aside box replace
"{White" with "{Black, White"
- Page 185
- Line 1 replace "and average" with
"number of"
- Line 2 replace "word length" with
"articles"
- Line 240
- Line 11 from bottom replace "9.2128"
with "921.28"
- Page 275
- Line 4 replace "both functions return and
int value and require two int parameters."
with "each of the functions requires two int parameters
and returns an int
value.
- Page 338
- Listing 7.2 caption replace "uniform.c"
with "uniform.cpp"
- Page 355
- Exercise 7.8(e) line 2 replace "x * y"
with "a * b"
- Page 370
- Line 4 after figure replace "eight"
with "ten"
- Page 380
- Line 4 after the figure replace "(1"
with "(2"
- Line 9 after the figure replace "1 is mapped
to red, 2 is mapped to green, 3 is mapped to
blue" with "2 is mapped to red, 3 is
mapped to green, 4 is mapped to blue"
- Page 396
- Exercise 8.7 line 13 replace "t.value"
with "t.Value"
- Page 406
- Line 13 replace "(the implementation"
with "(the implementations"
- Line 14 replace "is in file" with
"are in file"
- Page 432
- Page 466
- Line 12 from bottom replace "tain hold"
with "tain"
- Page 482
- Line 11 from bottom replace "is not less
than" with "is less than"
- Page 489
- Replace lines 5-9 (last 4 lines of paragraph 2)
with the following:
- Althought the fundamental types do not
have constructors, C++ automatically
provides a mechanism so that elements of
fundamental types are set by default to
the value 0. Therefore, the elements of
lists A,
B,
C,
and D
are all initialized to 0. The elements of
E
are automatically initialized using the
the default constructor of the Rational
class, which gives them the
representation 0/1.
- Page 491
- Line 3 bool should be in bold font
- Page 512
- Line 9 replace "vector<<vector"
with "vector<vector"
- Page518
- Figure 10.5 has the wrong image. The correct
image should be
- Page 519
- Figure 10.7 has the wrong image. The correct
image should be
- Figure 10.8 has the wrong image. The correct
image should be
- Page 568
- Line 15 replace "4 6" with "3
2"
- Line 1 after Listing 11.4 replace "One is
the text window," with "One is the
control window,"
- Page 569
- In Figure 11.6 replace "EzWindows text"
with "Control" and replace
"User-created" with
"Program-created"
- Page 570
- Line 8 from bottom replace "PhotoBmp"
with "Photo"
- Page 574
- Line 3 replace "Listing 11.5" with
"Listing 11.6"
- Page 609
- Line 14 from bottom replace "Rational
rPtr" with "Rational *rPtr"
- Line 15 from bottom replace "char s"
with "char *s"
- Page 636
- Line 8 from bottom replace "results."
with "results. Similarly, returning memory
more than once or returning memory that was not
acquired through a new operation
produces undefined results."
- Page 660
- Line 16 from bottom replace "that is,
not" with "for example, not"
- Page 662
- Line 14 replace "two classes" with
"two classes."
- Line 17 replace "some it" with
"some of it"
- Page 666
- Line 13 from bottom replace
"classDerivedClass:" with "class
DerivedClass : "
- Line 13 from bottom replace
"publicBaseClass{" with "public
BaseClass {"
- Page 671
- Line 6 replace "BClass(Plist)" with
"BClass(BList)"
- Line 7 replace
"Bodyofderivedclassconstructor" with
"Body of derived class constructor"
- Before line 14, which begins with "This
constructor", there is whitespace. This
whitespace should be replaced with
Shape::Shape(SimpleWindow &w, const Position &p,
const color &c) : WindowObject(w, p), Color(c) {
// no code needed!
}
- Page 680
- Line 5 from bottom replace "version the
calls" with "version some calls"
- Page 744
- Line 2 from bottom replace "(A nonnull"
with "(A null"
- Page 811
- Line 4 iterator should be in the code font
(LucidaSansTypewrite)
- Line 7 iterator should be in the code font
(LucidaSansTypewrite)
- Line 9 replace "of the copy into the
vector" with "of the element that
previously occurred after the removed
element"
- Page 814
- Line 5 from bottom replace "Characters from
position n through m are removed from the
string" with "The function removes m
characters starting at position n from the
string"
- Page 815
- Remove lines 18 - 25. The member functions
front() and back() were not added to the final
version of the string library.
- Insert at line 18 the following description of
the function substr()
- string substr(int n, int m) returns a
substring of length m of the string,
where the substring is copy of the string
starting at position n.
- Page 849
- Line 1 from bottom replace
"psuedorandom" with
"pseudorandom"
- Page 854
- Line 6 from bottom replace "be path"
with "be a path"
- Page 855
- Line 3 replace "We the executable" with
"We want the executable"
- Page 856
- Figure F.4 is the wrong image. The correct image
should be
- Page 863
- Line 2 from bottom replace
"ezwin.lib" with
"ezwinvc`60.lib"
- Page 873
- Line 3 from bottom in leftmost column starts with
":: scope". Insert a new line before
this line. The new line should read
- : see member initialization list
- Page 887
- Under "mouse events" entry add index
entry "838-39
- Under "mouse events" subentry
"bitmaps, and" add indx entry
"848-849"
- Page
Corrections to the first edition are still available.