Learn To Program With C++

McGraw Hill/Osborne

Errata and Source Code
Updated January 24, 2009

Errata/Gotchas list

Every author endeavors for perfection. My apologies for the typos that have slipped through. We'll do our best to have these corrected for the next printing. What's a 'gotcha'?

It's not an errata--but it is something that, for whatever reason, people are missing.

Gotcha #1--the Command Prompt (Page 44)

A number of people reports problems when they open up a command window that they are not seeing the same thing displayed in the book. That's perfectly fine.

What you see, in the title bar of the Command Window, is the 'Current folder' or 'Current directory' that the Command Window places you in. Regardless of what it happens to be, you can still 'navigate' to the correct folder by using the CD command illustrated on page 44, which a bunch of people are missing. Using the CD command, you can get to the location of your C++ Source file--no matter where it is. And, provided you have properly installed your compiler, you can then execute your program from anywhere.

General problem with cin.getline(response,256);

I'm receiving reports that this line of code 


is failing to permit the user to enter a response when used with certain compilers such as

If so, replace it with this one

cin >> response;

and you'll be OK.

Chapter 1

Chapter 2

None that we know of

Chapter 3

Chapter 4

        const float MATH_MIDTERM_PERCENTAGE =.5F;

        should be 

        const float MATH_MIDTERM_PERCENTAGE =.50;

Chapter 5

Chapter 6

Chapter 7

Chapter 8

Chapter 9

        class SalariedEmployee: public Employee

Chapter 10

int grades[6];

should read

int grades[5]

Chapter 11

Cout << “The value of pGrades is “ << Grades << endl;

Chapter 12

None that we know of