There seem to be a wide variety of opinion how much errata should be posted and how it should be presented.
I have decided to post only errata that in my opinion may affect comprehension.
I do correct all typos and minor gramatical issues in future printings, and I may insert minor clarifications in the book.
I just don't post them all as errata.
All comment and corrections are welcome.
I often use the terse notation: s/old text/new text/
Thanks to all who reported problems.
Errors and clarifications to the 1st printing
pg 30: s/followed by "enter"/followed by 'enter'/
pg 33: s/(age -1)/(age 0)/ and change the explanation to
The output will be 22 and age's value 0. Why?
You didn't succeed in reading a value into it, so ideally it kept its initial value, but it didn't.
In sec4.6.3 and sec9.4, we will see how to properly test for input errors and deal with bad input.
For now, we'll just note that we always must beware of bad input.
pg 145: s/!(cin>>ch)/(!(cin>>ch))/
pg 202-204: The labels for the stack frames for the expression() and term() calls are reversed.
pg 202-203: The stack frames for primary() has a spurious "left" entry.
Chapter 11: in several places, the function draw_specifics() has been written without the final 's'.
pg 321: s/win3/win/ twice
pg 346 s/bottom left corner/top left corner/
pg 535: An improved version of Vector(int):
explicit Vector(int s, const T& val = T{}) :r{A{},s}
{
uninitialized_fill(r.elem, r.elem+r.sz, val); // elements are initialized
}
pg 558: s/LinkT>*/Link<T*>/
pg 561: s/for (list<T>::iterator p = v.begin(); p!=v.end(); ++p)/for (list<T>::iterator p = lst.begin(); p!=lst.end(); ++p)/
pg 561, second loop using auto: s/for (auto p = v.begin(); p!=v.end(); ++p)/for (auto p = lst.begin(); p!=lst.end(); ++p)/