Errata, Problem Solving with C++, 8th edition, Walt Savitch
Error list as of 8/25/2013. Email any errors to kenrick@uaa.alaska.edu
-
Page 65: At the bottom of page 65, "Monday" and "Tuesday" are treated as C-Strings and the + operator does not concatenate. To concatenate these must be of type
string
, a STL string. The correct code to replace this last line is: string day1="Monday"; string day2="Tuesday"; string day = day1 + day2;
-
Page 66: Continuation of the problem above. The line
"Monday " + "Tuesday"
should read: string day1 = "Monday "; string day2 = "Tuesday"; string day = day1 + day2;
-
Page 158: "The void function named get_one_total reads in the ..." "The function call to get_one_total is included in a for loop...". This text refers to a function but functions are not covered until the next chapter. However, the functionality of get_one_total is included in the display, so the references to get_one_total can be ignored at this point. The text should read: "The program reads in the report of one conservationist..." "The program loops through the number of reports, and for each report, calculates the total number of eggs found." The code for this display contains some high-bit ASCII characters that may result in improperly delimited strings. A revised code listing is here: 03-15.cpp
-
Page 251: In the Programming Example Box,
C = ( 5 / 9 ) ( F x 32 )
should read C = (5 / 9) (F - 32)
-
Page 354: Ahh--do-be-do should be Ahhdo--be--do.
-
Page 453: Dobe END OF OUTPUT should be Dobedo END OF OUTPUT
-
Page 809: The VideoNote that references Programming Project 14.11 really
references Programming Project 14.12.