Big C++/Brief C++ 3rd Edition

Bug Report Page

Section 3.8
Change “then the integer variable floor is not set. Instead” to “then the integer variable floor is set to 0. (Prior to C++ 11 it was left unchanged.) Moreover”
Practice 4.4: do/while loops Problem 1
This problem assumes the behavior prior to C++ 11 where cin >> value left value unchanged on input failure. Use this replacement.
Exercise R4.1c
Add i++; below else { cout << stripes << endl; }
Exercise R4.2a
Change cout << i + " " + j to cout << i << " " << j
Exercise R4.2b
Change j++; to j--;
How To 5.1 Step 6
Change
cout << "Expected: 300";
to
cout << "Expected: 300" << endl;
Section 5.9
Change
void withdraw(double& balance, double amount, bool success)
to
void withdraw(double& balance, double amount, bool& success)
Section 5.10
In the program fragment at the very end, change
for (int j = 0; j < i; j++)
to
for (int j = 0; j <= i; j++)
Programming Tip 6.2
Change “For a beginner, the sole advantage of an array is the initialization syntax.” to “Before C++ 11, some programmers chose arrays because vectors did not have a convenient initialization syntax.”
Special Topic 6.5
Change “The range-based for loop also works for arrays:” to “The range-based for loop also works for arrays whose size is known at compile-time:”
Exercise E6.9
Change “two vectors” to “two arrays”
Section 8.5
Change “Here argc is the count of arguments, and argv contains the values of the arguments.” to “The argv array contains the program name and command-line arguments, and argc is the length of the array.”
Vitalsource Chapter 10 Interactive Review and Practice | Chapter Review Problem 7
Remove the } under the definition of the Player class. Change
{
   _______________________
to
   : _______________________
{

VitalSource Chapter 11 | Chapter Review Problem 9
The reference solution is wrong. Until it is replaced, ignore: “, where no two consecutive letters are repeated. For example, if the word is art and n is 3, then ata is allowed but arr is not.”
Special Topic 13.3
Change “Note that the return type is a reference to ostream, and not an ostream object. ” to “Note that the return type is a reference to istream, and not an istream object. ”
Section 14.3
Change “cost of 1,280” to “cost of 1,281”, “we pay 1280 · T1” to “we pay 1281 · T1”, “the total cost is a bit less than 1280 · (T1 + 2T2)” to “the total cost is a bit less than 1281 · (T1 + 2T2)”.
Problem P14.9
Change “append the instructions to a string” to “push the reverse Polish fragment onto a stack of strings”
Section 15.2 Table 2
In row 5, remove int n2 = scores.at("Diana"); and replace “or a default (zero for integers) if the key is not present, without adding the key to the map.” with “. An exception occurs if the key is not present.”
Section 16.2 Companion Code question_tree_demo.cpp
There was one unnecessary constructor in the declaration of BinaryTree. The correct declaration should be
   BinaryTree question_tree(
      "Is it a mammal?",
      BinaryTree("Does it have stripes?",
         BinaryTree("Is it a carnivore?",
            BinaryTree("It is a tiger."),
            BinaryTree("It is a zebra.")),
         BinaryTree("It is a pig.")),
      BinaryTree("Does it fly?",
         BinaryTree("It is an eagle."),
         BinaryTree("Does it swim?",
            BinaryTree("It is a penguin."),
            BinaryTree("It is an ostrich."))));
VitalSource Section 16.3 Self Check 1
In the code, replace Tree with Node (2x) and change
root.insert_node(new_node)
to
root->insert_node(new_node)
Worked Example 16.2
In the description and in treedemo.cpp, change
int populate(RedBlackTree t)
to
int populate(RedBlackTree& t)
Glossary entry for Unicode
Change the entry to: “A standard code that assigns code values to characters used in scripts around the world.”
VitalSource Chapter 16 Interactive Review and Practice / Chapter Review Question 7
In the third question and the explanation, change “a right child of the root” to “a left child of the node holding 18”.
Testbank Chapter 2 Problem 103
Change “An empty string literal is represented as " "” to “An empty string literal is represented as ""

Thanks to Doug Case, Stephen Gilbert, Cindy Johnson, Alex Lin, Ohlone CS 124-01 S2022, Christopher Painter-Wakefield, Anthony Rutledge, Dan Tecu, David Topham, Lee Wittenberg, Kyle Ziegler, and (your name might go here) for their bug reports and suggestions.

Bug Report Form

Please use this form to report any bugs that you find. Please check the list of known bugs first before you report a bug. Unfortunately, I do not have the time to respond personally to every report, but I do read them all and will post updates to this page. Thank you!

Your name:

Your email address:

Page number:

Problem description:

To protect against spam robots, please answer this simple math problem:
* =