Article View: net.lang.c++
Article #57C++ book errata
From: Bjarne Stroustrup
Date: Thu, 06 Mar 1986 14:44
Date: Thu, 06 Mar 1986 14:44
100 lines
3186 bytes
3186 bytes
> From alice!allegra!watmath!watrose!tedoner Tue Mar 4 01:48:18 1986
> From: Terry Doner <allegra!watmath!watrose!tedoner>
> Subject: Typos in the C++ book.
>
> You mentioned in one of your postings to net.lang.c++ that you were
> receiving corrections from people. Would you consider posting an erratum.
I guess that would only be fair. Here is a list of typos/bugs.
They have all been fixed for the second printing (so, since Addison Wesley
has sold out, you should be unable to buy a C++ book with these typos.
I have left out simple spelling mistakes, etc. Please don't get the
impression that the book is ``buggy''. Making corections for the second
printing is the normal mode of operation (for example, Knuth Vol 3 page vi),
and Brian assures me that there were a similar number of bugs/typos fixed
for the second printing of K&R.
Page 20 last example:
v[i] = i; => v[i] = t;
Page 20 last line:
MAX/2 => MAX-1
Page 26 fourth line of second paragraph:
nextchar => state
Page 49 last example:
return q-p; => return q-p-1;
Page 51 middle:
[5,1] => [4,1]
[5][1] => [4][1]
Page 57 bottom:
vec[large] => vec[large+1]
Page 60:
65 => 63
0x35 => 0x53
65536 => 65535
Page 61:
'x06f' => 'x05f'
Page 64:
*q = 7; => *p3 = 7;
Page 76:
string_value => name_string
Page 80 middle:
if (i < 0) => if (ii < 0)
Page 85 first paraghaph:
+ is right => + is left
Page 91 middle:
new node => new enode
Page 100:
cat(p) => rev(p)
Page 112:
string_value => name_string
Page 123 third paragraph:
Here 1 => Here a
Page 127 bottom:
; k<sz-1; => ; k<sz;
Page 135:
today.set(1,18 => today.set(18,1
Page 149 example:
j = 0; => int j = 0;
Page 150 example:
j = 0; => int j = 0;
m.m => m.v
Page 161, the destructor ought to look like this:
classdef::~classdef()
{
// ...
delete members;
delete friends;
}
Page 163 last paragraph:
12 => 16
16 => 20
Page 164:
Pexpr q = => name* q =
Page 196 second paragraph:
g() => clear()
Page 199 third paragraph:
5.12.3 => 5.5.4
Page 232 second paragraph:
It is not => It is
(That is, you can now mix <stream.h> and <stdio.h> stuff in a single program).
Page 276 first paragraph:
tnode.set => tnode::set
word => tword
Page 280 second paragraph of 8.5.7:
before => after
Page 287 last line of 8.6.2:
succeding => preceding
Page 292:
color cp = => color* cp =
Page 293 (9.3):
integral or => arithmetic or
Page 294 (9.7):
integral or => arithmetic or
Page 298 second paragraph:
member b1 => member b
member b2 => member c
Thanks to all who sent me typos, comments, etc.
- Bjarne Stroustrup (AT&T Bell Labs, Murray Hill)
Technical Details
Message-ID:
<5081@alice.uUCp>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!alice!bsShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!alice!bs From: bs@alice.UucP (Bjarne Stroustrup) Newsgroups: net.lang.c++ Subject: C++ book errata Message-ID: <5081@alice.uUCp> Date: Thu, 6-Mar-86 09:44:53 EST Article-I.D.: alice.5081 Posted: Thu Mar 6 09:44:53 1986 Date-Received: Fri, 7-Mar-86 08:19:39 EST Organization: Bell Labs, Murray Hill Lines: 100