Errata
- Error in fgw_text.h file on CD
- Unfortunately a tiny error crept through the test on my library. In
fgw_text.hsearch for the line
if(not cin.eof()) eat_ws_to_eol(std::cin);
and addstd::immediately beforecin.eof() Contributed by Martin Ross
- Page xv (Preface)
- On page xv of the Preface it states that the appendices are provided on the CD in PDF format. As a result of a problem that was discovered too late to correct, the appendices are only provided in HTML and MSWord formats.
Contributed by Francis Glassborow
- Page 31
- on page 31 on the 4th line upwards from the bottom of the page, my copy reads: "Exercise 1 three_imes_table_row" instead of "Exercise 1 three_times_table_row".
Contributed by François Ehret
- Page 38
- Just above 'Using a function' heading the text says "Let us look at .. the problem of drawing a line across a Playpen…" Change 'line across' to 'cross in'.
Contributed by Francis Glassborow
- Page 38
- The paragraph that starts 'That says that ...' (after the first line of source code) at the end of the first sentence 'and that will need to know what your PIN is.' should read 'and that it will need to know what your PIN is.'
Contributed by Richard Elderton.
- Page 40
- Perhaps the tentative declaration of draw_a_cross after 'We could write it like: this' near the top of the page should have a semicolon at the end.
Contributed by Richard Elderton.
- Page 46
- In task 3 change
drawing_lines_functions.cpptodrawing_functions.cpp. Contributed by Roger Orr
- Page 47
- In task 4 change
draw_functions.cpptodrawing_functions.cpp. Contributed by Roger Orr
- Page 48
- In Exercise 1 change
draw_functions.cpptodrawing_functions.cpp. Contributed by Roger Orr
- Page 72
- Insert
#include "utilities.h"before#include <fstream>in the displayed code. Contributed by Roger Orr
- Page 76
- Change
int count_of_a;in the solution to exercise 2 toint count_of_a(0); Contributed by Chris Young
- Page 78
- In the displayed code in the middle of the page:
numbers.push_back[i];should be:numbers.push_back(i); Contributed by Roberta Allen
- Page 79
- Insert
sort(numbers.begin(), numbers.end());immediately beforeint total(0);to sortnumbersinto ascending numerical order. Necessary to ensure that the calculation of the mean works correctly. Contributed by Chris Young
- Page 84
- Insert 'to' between 'you' and 'walk' on line 1.
Contributed by Chris Young
- Page 86
- Place double quotes round
ddata.txtin the first line of the second piece of displayed source code so that the line reads:
ofstream decimaldata("ddata.txt"); Contributed by Chris Young
- Page 87
- Change
fgw::read<>(std::string)(line 1) tofgw::read<>(std::string&). - Change
fgw::read<>(std::istream)(line 4) tofgw::read<>(std::istream&). Contributed by Roger Orr
- Page 99
- The definition of
point2d::modulus()in the middle of the page has a potential problem. If the original modulus is zero (shouldn't ever happen) the definition of scale results in an attempt to divide by zero. You can trap this by inserting
if(not modulus()) throw "Attempt to divide by zero";
before the definition ofold_modulus. Contributed by Loic Joly
- Page 101 (format typo)
- Insert a tab before
for(int finished(0); finished !=1; ){" Contributed by Roger Orr
- Page 111
- In the first line of the third paragraph of the technical note replace 'an
& const' with 'aconst &'. Contributed by Chris Young
- Page 125
- Change 'Exercise 2' to 'Exercise 4'.
Contributed by Roger Orr
- Page 139
- Remove the
std::prefix tofind()at the beginning of the last paragraph on this page. Contributed by Loic Joly
- Page 144
- Remove 'and plot_pixel()' from line 1 of Task 19 as it is already done. Adjust the following paragraph accordingly ('it' for 'them' etc.)
Contributed by Roger Orr
- Page 150
- In the declaration in Exercise 1 change
shapetofgw::shape Contributed by Roger Orr
- Back Cover
- The URI at the bottom does not work. It should be www.wileyeurope.com then select 'author' and search for 'glassborow'. (added by FGW, Actually the URI sometimes works and sometimes does not. I think Wiley have now fixed the problem)
Contributed by Chris Young
If you find an error that is not listed above please go to the Contact page and use the form provided there to notify us.