Changes Made from the Second Printing to the Third
Chapter 4
Page |
Line |
Change |
To |
210 |
7, 8 of Fig. 4.1 |
iostream.h Insert after line 8: |
iostream using namespace std; |
216 |
22-24T |
Replace last sentence of para. |
To use the class, a program must include the library's header file. |
217 |
End of first paragraph |
Add a footnote reference |
3 |
|
Footnote 2 |
stdio |
cstdio |
|
Bottom of page |
Add new footnote |
3 istream and ostream are really specializations of class templates basic_istream and basic_ostream to type char, which are derived from the basic_ios class that handles the low-level details of formatting, buffers, and so on. Using wchar_t instead of char produces wide-character streams wistream and wostream. (See Chapter 8 for more details.) |
219 |
15T & footnote |
Footnote number 3 |
Footnote number 4 |
220 |
7T |
good() |
good |
|
21T & footnote |
Footnote number 4 |
Footnote number 5 |
221 |
113 |
Footnote number 5 |
Footnote number 6 |
|
Footnote |
5 iomanip.h header file |
6 iomanip library |
222 |
1st paragraph |
Replace |
Any C++ program that includes the the iostream library will automatically have the following output streams from the program to whatever device the user is using for output a window, a terminal, etc.:cout : the standard buffered output stream for displaying normal outputcerr and clog: standard output streams for displaying error or diagnostic messages (clog is buffered; cerr is not) |
|
1st diagram |
Add another arrow |
Click to enlarge |
|
Last para. |
These characters actually remain in the ostream |
Unlike cerr, which is unbuffered, characters actually remain in cout or clog, |
225 |
1B |
Footnote number 6 |
7 |
|
Footnote |
iomanip.h header file |
iomanip library |
231 |
End of first sentence |
Add footnote reference |
8 |
|
Bottom of page |
Insert footnote |
8 The class string is really a specialization of the class template basic_string to type char. (Class templates are described in Section 9.4.) Also, a recent feature added to C++ is the ability to read input from a string or to write output to a string. This is made possible by means of string streams defined in the <sstream> library (see Chapter 8). |
240 |
10T (not including diagrams) |
'R' |
"R" |
241 |
6,11,14,15,17 (not including diagrams) |
remove |
erase |
245 |
last line |
remove |
erase |
246 |
Exer. 24 |
remove |
erase |
251 |
7T |
stdlib.h Insert after this line: |
cstdlib using namespace std; |
|
5 above Fig. 4.3 |
stdlib.h |
cstdlib |
|
7, 8 of Fig. 4.3 |
iostream.h Insert after line 8: |
iostream using namespace std; |
253 |
7B & footnote |
Footnote number 7 |
9 |
255 |
1T |
iostream.h Insert after this line: |
iostream using namespace std; |
|
2B |
Delete return 0; |
|