Programming (2nd) - Errata

Modified November 15, 2014.

This is errata for Programming: Principles and Practice using C++ (Second Edition).

Comments, improvements, bug reports, etc. are welcome.

This is not a list that a reader should go through to carefully correct a copy of the book; most errata is far too minor to bother or confuse most people. I recommend using this list only if you suspect a mistake in the book -- look at the errata before doubting your understanding.

I list both corrections and clarifications. There is essentially no problem that I consider too small to list, so you might find many pieces of errata too minor to bother with (I know because I have received email to that effect), but I'd rather not make decisions about what an unknown reader will find bothersome. Please note that the number of errata does not equal the number of errors. Most errata are clarifications/improvements, not correction of errors.

The major source of errata is now translators and reviewers of translations: People who go through the text paragraph-by-paragraph, sentence-by-sentence, and word-by-word trying to render it accurately and colloquially in another language find problems that a native English reader rarely spot. My hope is that the resulting clarifications will be especially valuable for readers of the English text who are (like me) not native English speakers.

Big issues, such as "why don't you use XXX for your GUI?", "please add two more chapters on the STL", and "please use C++0x features to simplify the code" are not errata but considerations for future work and will not appear here.

Different people have different preferences for sorting errata: in chronological order, in page order, each printing separate, all printings merged, etc. However, I can't manage multiple organizations, so what you get is what seems to be most useful for most people.

At the request of repeat visitors to the page, I have started to add dates of posting of individual errata. If an errata is changed, so is its date.

As an abbreviation I use, s/before/after/ to mean replace "before" with "after".

This is the errata for the 5th printing. The errata for the 4th printing is here. The printing number can be found on the bottom of the copyright page.

Table of contents

Chapter 0

Chapter 1

Chapter 2

Chapter 3

Chapter 4 ul>

  • pg 122: s/for(int x/for(double x/ twice

    Chapter 5

    Chapter 6

    Chapter 7

    Chapter 8

    Chapter 9

    Chapter 10

    Chapter 11

    Chapter 12

    Chapter 13

    Chapter 14

    Chapter 15

    Chapter 16

    Chapter 17

    Chapter 18

    Chapter 19

    Chapter 20

    Chapter 21

    Chapter 22

    Chapter 23

    Chapter 24

    Chapter 25

    Chapter 26

    Chapter 27

    Appendix A

    Appendix B

    Appendix C

    Appendix E





    Wenjie Guan, Paolo Monteverde, Felix Winter