C++ for You++, AP edition: ========================== p. 40, second paragraph: Now: chose names Should read: choose names p. 184, middle: Now: char& r; char & r; char &r; Should read: char& r = ... char & r = ... char &r = ... p. 217, third paragraph from the bottom: Now: you program Should read: your program p. 219, second paragraph: Now: charater arrays Should read: character arrays p. 255, fourth paragraph: Now: can be also used Should read: can also be used p. 264: Both class definitions are missing a semicolon after the closing brace. p. 331, fifth line: Now: cout << fileName << ':\n' << line << endl; Should read: cout << fileName << ":\n" << line << endl; p. 550, last line: Now: inp.seekg(0); Should read: inpFile.seekg(0); C++ for You++, AP edition, second printing: ========================================== p. 82, last paragraph: Now: do not change the functions' arguments from short to double. Should read: do not change the functions' arguments short data type. p. 136, ReadNumbers(...) function: Now: // Returns the number of the elements read, or 0 if the file // does not exist or is empty. ... return n; Should read: // Returns true if the file is opened successfully, false otherwise. ... return true; p. 267, top: Now: return (year >= 1950 && year <= 2100) Should read: return (date.year >= 1950 && date.year <= 2100) p. 439, top: Now: XNODE(const apstring *s, XNODE *lptr, XNODE *rptr); Should read either: XNODE(const apstring &s, XNODE *lptr, XNODE *rptr); or XNODE(const char *s, XNODE *lptr, XNODE *rptr); p. 499, middle: Now: Otherwise, if a[j] is greater or equal to the pivot Should read: Otherwise, if v[j] is greater or equal to the pivot C++ for You++, AP edition, first printing: ========================================== p. 94, bottom -- p. 95, top: Now: For example: Should read: For example: apmatrix m; // Declare an empty matrix int nRows, nCols; ... cin >> nRows >> nCols; // Read new dimensions m.resize(nRows, nCols); // Set new dimensions Workbook to Accompany C++ for You++, AP Edition: =============================================== p. 24, No. 14 should read: apvector scores(16); p. 32, No. 15: The numbers in the third column are actually for Schedule Y. In Schedule X they should be 3,502.50, 12,798.50, 31,832.50, and 81,710.50. p. 34, No. 4 should read: 1 - 1/2 + 1/3 - 1/4 + ... - 1/n+... p. 38, No. 15 should read: // v[0] - v[1] + v[2] - v[3] + ... - v[n-1]; p. 45, No. 7: A parenthesis is missing before the sum. p. 51, No. 20 should read: void RotateVector(double &x, double &y, double &u, double &v) p. 65, No. 1 should read: cout << "She sells sea"; p. 79, No. 18 should read: mList[i] = i+1; p. 97, Ch 17-20 Rev. No. 2: The phrase "Take precautions agains aliasing..." etc. does not apply here. It would be relevant only if head were passed by reference, too. p. 99, No. 9 is included twice. p. 100 No. 11 should read: apqueue::apqueue(int size); Workbook Answers and Solutions: ============================== p. 131, Ch 1 No. 37 should read: 18 bits = 2.25 bytes. p. 131, Ch 2 No. 9 should read: int, return p. 133, Ch 7 No. 9 should read: 3 1 4 1 p. 133, Ch 6-8 Rev. No. 6 should read: w[i-1] = i; w[2*n-1-i] = i; p. 136, Ch 13 No. 11 should read: << book.nPages << " pp."; p. 138, Ch 18 No. 4 should read: pop cursor.x, cursor.y in reverse order. p. 139, Ch 19 No. 6 should read: long CountPaths(int x, int y) { if (x <= 0 || y <= 0) return 1; else return CountPaths(x-1, y) + CountPaths(x, y-1); } p. 141, Ch 22-25 Rev. No. 6 should read: C and C++ or C and Cobol