ADTs, Data Structures, and Problem Solving with C++, 2e

 

Errata List for First Printing

Page

Line

Change

To

24 9T assert(amount >= 0); assert(newAmount >= 0);
53 2T 6.625 22.625
63 9-11T Order of declarations (so they agree
with the memory map below them)
char charVar = 'A';
double doubleVar;
int intVar = 1234;
141 Problem 12

Problem 13

Problem 14

Problem 2

Problem 3

Problem 4

Problem 1

Problem 2

Problem 3

163 Last line 103 mil. time 102 mil.time
247 Line below 1st diagram Ci = Pi % 2773 Ci = Pi17 % 2773
257 3T delete() erase()
266 16T i < mySize i < mySize - 1
282 Boxed display Delete const in the return type of
both the prototype and definition
283 12B const reference reference
303 8T Exercises 18-23 Exercises 18-21
  9T Programming Problems 7-12 Programming Problems 3-8
359 5 references to Figure 7.5 Figure 7.5 Figure 7.4
483-4 Sample outputs Comment:
In Visual Studio .NET, the capacity seems to
increase by a factor of 1.5 rather than double.
 
547 2T ExpressionParser Expression
596 4T Insert // before end class Term  
600 6B & 10B polySum sumPoly
626 14-15B Insert #include <cmath>
above using namespace std;
 
651 3T 1 - 10 1 - 9
  4T function linearSearch() the linear search algorithm
  6T first if inside the for loop the while loop
671-686 671:3B, 672:16T, 673:3B, 674:15T,
677: 6T, 679:4B, 680:13T, 681:4T,
685:12T & 12B, 686: 2T
BST<DataType>::BinNodePointer BinNodePointer
717 Prob. 16 recursive nonrecursive
724 10T n - 1 n
739 11T While r < n While c < n
740 10B & 6B parent = (loc - 1) / 2 parent = loc / 2
833 Last row of table (code for E) 1 11
854 13B (Ex. 3) and auto
868 Item 2 in definition of B-tree is a 2-node, 3-node, . . ., or an m-node (except the root) is a k-node
where (m + 1) / 2 ≤ k &le m
873 9B & 10B
Ex. 22 & 23
a node an element
899 Last 2 rows of table Value 2 in column for E 1
C3 Last line USHRT_MAX UCHAR_MAX
C4 2-3T SHORT_MIN

SHORT_MAX

SHRT_MIN

SHRT_MAX

C15 2B != ~=
C32 13B (Fig.C.8) Insert #include <cassert>
above using namespace std;
 
C33 4-5T (Fig.C.8) Insert
assert( inStream.is_open() );
after line 4 and
assert( outStream.is_open() );
after line 5
 
E5 2nd bullet 1st column:

2nd bullet 2nd column:

Delete "short and"

Delete: "No short type and"
and change "there" to "There"

 
E10 22T operator>>istream operator>>(istream
  24T out in
F5 Quick Quiz 6.3 Renumber answers 2- 14 as 4, 5, ..., 16

Insert the following answers for Ques. 2 & 3:
2. (i) Design the class.
    (ii) Implement the class

3. (i) Define data members to store data values.
    (ii) Define function members identified in
        the design phase.

 

 


My thanks to those who have reported errors to me, including:



  This page maintained by Larry Nyhoff Last modified: