C++ Without Fear (2016) Errata - Brian Overland

C++ Without Fear (2016) Errata

C++ Without Fear (2016) Errata

Note: these errors apply to the first printing only. They will all be corrected for the second printing onward. I apologize profusely for these errors, but not every error I caught in the late state of editing was incorporated before the final printing stage.


Chapter 1, page 1. The downloading program “vc_community,” mentioned twice, should be “vs_community.”


Chapter 1, page 2. Steps 3 and 4 are wrong. They should say that you choose Custom Installation, not Typical Installation. Then, in the Custom Install window, de-select every option but “Programming Languages.” That option must be switched ON for generic C++ code to be compiled correctly. (This error is due in part to Microsoft’s changing the project settings back and forth while I was writing the book.)


Chapter 1, page 4. When creating a project, instead of choosing “Finish” (as mentioned at top of page), choose “Next.” Then, in the Project Options window, de-select “Precompiled Headers” and “Security Development Lifetime” checks. De-selecting Precompiled Headers will allow you to use 100% generic C++ code without change. This is recommended, although not 100% essential.


Chapter 3, pages 68 and 69. In the code fragments in the middle of each page, the following statement appears:

n += sum;

In each case, this should instead be:

sum += n;


Chapter 7, page 168. Near the very bottom of the page is a variable declaration:

int lowest = 0;

This is a typo. This should instead be:

int low = 0;


Chapter 12, page 299. In the code at the top of the page, fifth line down, is the following statement:

my_tree.insert(s);

This should be:

my_tree.insert(sInput);


Chapter 13, page 322. The code fragment in the very middle of the page is:

SL.insert(iter, s);

This should instead be:

LS.insert(iter, s);


Chapter 15, page 380. The seventh line of code from the top reads as follows:

string rank_hands();

Also, the very first line of code at the top of page 381 starts with the following line:

string Eval::rank_hands() {

In both these cases, “rank_hands” (plural) should be “rank_hand” (singular). Drop the “s” at the end.


Page 381. The fourth line of code near the top of the page has two occurrences of “ranksCount”….

if (ranksCount[12] && ranksCount[11]) { // A & K

In both cases, “ranksCount” should be “rankCounts”. (Move the “s” to the end of the name in this case.)