Data Abstraction & Problem Solving with C++
Walls and Mirrors
Frank M. Carrano
University of Rhode Island
Timothy M. Henry
New England Institute of Technology
Connect with us
Last updated on February 8, 2019.
The date after each error is the date it was posted on this list. Subsequent printings of the book will correct these errors.
If you find an error and it is not on this list, please e-mail a description of the error, the page number, and the tile/edition of the book.
Page 25 (Apr. 7, 2016)
#endif as line 56 to the listing at the top of the page.
Page 90 (Apr. 27, 2016)
Exercise 10b: The sample call to
writeBlock should be
writeBlock( '*', 3, 5)
Page 91 (Apr. 7, 2016)
The data type for
result is missing in the second line on the page:
int result = mystery(30);
Page 91 (Apr. 27, 2016)
In Exercise 14, add a new-line character to the
cout statment in the
main function as follows:
std::cout << "The value of f(8) is \n" << f(8) << std::endl;
Page 100 (Apr. 27, 2016)
In line 32 of Listing 3-1, precede
std:: as follows:
std::vector toVector() const;
Page 102 (Apr. 27, 2016)
In the method
std:: is missing twice as follows:
std::vector<ItemType> ArrayBag::toVector() const
Page 119 (Nov. 19, 2017)
In the line of text right after the 10 lines of code, replace
hammerItem has already been stored in the magic box,
specialItem should . . ."
Page 125 (Apr. 7, 2016)
In Listing C2-2 at the bottom of the page, change the method name
fixedLeak in line 13 to
Page 147 (Feb. 8, 2019)
Revise the first bullet at the top of the page, as follows:
- Use the assignment operator to assign an existing object to a
variable newly created, uninitialized object,
Page 271 (Nov. 29, 2018)
The third line of italic text should be
<postfix> <postfix2> <operator>
Page 272 (Nov. 29, 2018)
Segment 5.2.4, Paragraph 3, Line 5: Change "Programming Problem 9" to "Programming Problem 8"
Page 321 (May 27, 2016)
Revise Exercise 3d by moving the occurrence of n, as follows:
d. Displaying all
n names in an array of n linked chains
Page 371 (Apr. 7, 2016)
The comment in line 60 of Listing 12-1 should end with
Page 389 (May 27, 2016)
In Exercise 1b, we assume that
spherePtr points to an instance of
ballPtr points to an instance of
Page 412 (May 27, 2016)
In Exercise 13, replace
aQueue in the third and fourth axioms with
Queue() three times.
Thus, those two axioms should be
(Queue().enqueue(item)).dequeue() ==> Queue()
(Queue().enqueue(item)).peekFront() = item
Page 432 (June 9, 2016)
In the definition of the method
Page 471 (June 9, 2016)
Exercise 6 is the same as Exercise 3a in Chapter 16. Wait until then before solving it.
Page 474 (June 9, 2016)
In the first line on the page, which is part c of Exercise 20, delete the word "formal."
Page 491 (June 9, 2016)
In the third line of the pseudocode at the top of the page, change
curPtr = nodeStack.peek().
Page 511 (June 9, 2016)
Exercise 9: Replace the first sentence with "Trace the nonrecursive inorder traversal algorithm for the binary search tree pictured in Figure 16-4." In the second sentence, delete the word "implicit."
Exercise 11: Change 13 to 14.
Page 524 (Apr. 7, 2016)
Line 5 of Listing 17-2 should be
Page 558 (Apr. 7, 2016)
In the header of the method
add near the bottom of the page, a comma is misplaced. The code should be as follows:
bool ArrayDictionary::add(const KeyType& searchKey,
const ValueType& newValue
Page 584 (July 17, 2016)
Delete the duplicate occurrence of
nextEntryPtr in Line 22 of Listing 18-5.
Page 647 (Apr. 27, 2016)
The third statement in the list of three statements at the beginning of the page should be numbered "3" instead of "2."
Page 661 (July 17, 2016)
The graph in Figure 20-36 is for only Exercise 10.
(End of errata)