<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Accelerated C++ Errata</title>
<link rel="stylesheet" type="text/css" href="./acc.css" />
</head>
<body>
<div class="prevnext">
<a href="109.htm"><img src="images/Prev1.gif" /></a>
</div>
<h1>Accelerated C++ Errata</h1>
<em>Last modified 23 September 2004.</em>
<p>
Every book has bugs in it, and <cite>Accelerated C++</cite> is
no
exception.
This page notes the bugs that have come to our attention,
and the printings in which they were discovered.
All of these errors are corrected in the printing after the one in
which they were found, except that errors noted in the fifth printing
were not corrected until the ninth printing, which went to press in
August, 2004.
</p>
<p>
Please note that because of corrections, page numbers may sometimes
differ slightly from one printing to another.
So, for example, if you have a copy of the first printing, and you are
looking for a correction first noticed in the fourth printing,
you may find it on the page before or after the one cited.
</p>
<p>
Thanks to
Walter E. Brown,
Don Caldwell, Paolo Carlini,
Neil Cerutti, Harry Chung, David Clark, Anton Doblmaier,
Debatosh Debnath, Steven van Dijk, Hans Dulimarta, Daniel Faber,
Attila Feher, Adam Foster, Kevin Goodsell,
Seyed H. Haeri, Gregory Haley, Mogens Hansen,
Philip Hibbs, Anto Jurkovic,
John Linderman, Greg McClure, Miguel Mart�nez de la Torre,
Bernd Mohr, Wo-Yip Ng, Nicole McAllister,
Brian McNamara, Frank Mittelbach, Ron Natalie, John Potter,
Peter N. Roth, Andreas Scherer, William Simon,
Marc Souaille, Randy Sherman, Ralf Taner,
Antoine Trux, Alex Tuzlukov, Abraham Walfish,
Conrad Weisert, and Han Xu
for pointing them out!
</p><h2>Technical errors in the fifth printing</h2>
<ul>
<li>
Pages 32 and 307: The precedence table should say that the assignment and conditional
operators have the same precedence and are right-associative.
</li><li>
Page 173: In the second line from the end of the page,
<tt>*beg</tt> should be <tt>*begin</tt> (twice).
</li><li>
Page 179: The text should say that it is possible for <tt>argc</tt>to be zero.
</li><li>
Pages 191-192, 314: The types that containers are required to provide
include <tt>difference_type</tt>
</li><li>
Page 223: In the fourth line of the first complete paragraph,
<tt>iostream</tt> should be <tt>istream</tt>.
</li><li>
Page 224: In the fifth line after the second program example,
<tt>string</tt> should be <tt>Str</tt>.
</li><li>
Page 304: The text incorrectly states that <tt>float</tt> is promoted
to <tt>double</tt> as part of the standard arithmetic conversions.
</li></ul>
<h2>Clarifications in the fifth printing</h2>
<ul>
<li>
Page 24: The discussion at the bottom of the page should say explicitly
that treating a <tt>bool</tt> value as a number yields <tt>1</tt> if the
<tt>bool</tt> is <tt>true</tt> and<tt>0</tt> if the <tt>bool</tt> is <tt>false</tt>.
</li><li>
Page 216: In the code example at the bottom of the page, the call to
<tt>s.data.push_back</tt> is not the only compile error, because it is not
the only reference to <tt>s.data</tt>; there is another reference near the
beginning of the example.
</li></ul>
<h2>Typographical details in the fifth printing</h2>
<ul>
<li>
Page 57: In the fourth paragraph, the first sentence should end with
``end-of-file'' instead of ``end-of file.''
</li><li>
Page 111: In the last full paragraph, the variable named <tt>didn't</tt>
should be <tt>didnt</tt>.
</li><li>
Page 128: Near the bottom of the page, the sentence that refers to
``the data structure that <tt>split</tt> returns'' should instead
be referring to <tt>xref</tt>.
</li><li>
Page 154: There is a comma missing in the argument list of the call
to <tt>copy</tt> in the last line of exercise 8-6.
</li><li>
Page 219: The constructor of class <tt>Str</tt> should have parameters
named <tt>b</tt> and <tt>e</tt>, rather than <tt>i</tt> and <tt>j</tt>,
to match the version on page 212.
</li></ul>
<h2>Technical errors in the fourth printing</h2>
<ul>
<li>
Page 34: In exercise 2-10, the comparison <tt>k</tt> <tt>!=</tt> <tt>n</tt>
should be <tt>k</tt> <tt>!=</tt> <tt>10</tt>.
</li><li>
Page 70: The invariant near the bottom of the page should refer to
<tt>maxlen</tt> rather than <tt>max</tt>.
</li><li>
Page 174: In the third line from the bottom, <tt>coord</tt> <tt>+</tt> <tt>1</tt>
should be <tt>coords</tt> <tt>+</tt> <tt>1</tt>.
</li><li>
Page 183: In the comment in the code example near the bottom of the page,
<tt>p</tt> should be <tt>*p</tt>.
</li><li>
Page 190: In the last code example on the page, <tt>size_type</tt>
should be <tt>std::size_t</tt>.
Note that the similar example on page 193 is correct as it stands,
because <tt>size_type</tt> has now been defined.
</li><li>
Page 239: The call to <tt>students[i].grade()</tt> is dynamically bound,
not statically bound. However, because the type of <tt>students[i]</tt> is known
during compilation, the effect is the same as that of static binding.
</li><li>
Page 264: The first code example should call <tt>s1.read(cin)</tt>
rather than <tt>read(cin,</tt> <tt>s1)</tt>, and similarly for <tt>s2</tt>.
</li><li>
Pages 265-266: The text sometimes mentions the standard <tt>vector</tt> class
when it should refer to the <tt>Vec</tt> class that we are defining.
</li><li>
Page 280: The last code example has a spurious semicolon at the end.
</li><li>
Page 281: The first complete paragraph should note that <tt>Pic</tt>
must also be a friend.
</li><li>
Page 304: The list of conversions is missing an entry, just before the last one.
It should say: ``Otherwise, if either operand is <tt>unsigned</tt> <tt>int</tt>,
the result is <tt>unsigned</tt> <tt>int</tt>.''
It also needs to mention the integral promotions.
</li><li>
Page 307: The description of compound assignment should say
<tt>x</tt> <em>op</em><tt>=</tt> <tt>y</tt>
instead of
<tt>x</tt> <em>op</em><tt>=</tt> <tt>x</tt>
</li></ul>
<h2>Typographical details in the fourth printing</h2>
<ul>
The code examples are not consistent about whether to put a space
after <tt>template</tt>; that is, whether to say
<ol><tt>template<class T> class Vec { /* ... */ };</tt></ol>
or
<ol><tt>template <class T> class Vec { /* ... */ };</tt></ol>
Fortunately, it's correct either way.
</ul>
<h2>Clarifications in the fourth printing</h2>
<ul>
<li>
Pages 32 and 307: The description of compound assignments in the table should enumerate the
operators explicitly.
The description of <tt>%</tt> should say that the operands must be integers.
</li><li>
Page 100: In exercise 5-9, it's not clear whether a word containing mixed-case
letters is uppercase or lowercase.
The exercise should be to write all the words in the input that do not contain
any uppercase letters, followed by all the words that contain one or more uppercase letters.
</li><li>
Page 179: The program at the bottom of the page can be made easier to understand
by writing <tt>argv[1]</tt> as a special case, and then printing a space
<em>before</em> each subsequent argument, if any.
</li><li>
Pages 260 and 263: The initializations of <tt>p</tt> and <tt>refptr</tt>
are clearer if they appear in the same order as the definitions of the
data members themselves.
</li></ul>
<h2>Technical errors in the third printing</h2>
<ul>
<li>
Page 47: The invariant in the comment on the third line of the page
should say that <tt>homework</tt> contains all the homework grades read
so far, rather than all the grades.
Similarly for the invariant in the comment near the bottom of page 70.
</li><li>
Page 100: In exercise 5-6,
mwindancer
- 粉丝: 0
- 资源: 1
最新资源
- 半导体转换器-半控转换器-SEMI CONVERTER-matlab
- 鼠标中键(滚轮)调节音量-2
- visual studio 2022 community
- 剪映可以批量导出吗-芒果速剪
- Visual Studio 2022 v17.10.zip
- 白泽自动化运维系统配置管理、网络探测、资产管理、业务管理、CMDB、CD、DevOps、作业编排、任务编排等功能,未来将添加监控、报警、日志分析、大数据分析等部分内容.zip
- 车用驱动电机原理与控制基础-P141公式(6-21)
- 前端分析-2023071100789
- 多帧超分辨率框架下的图像融合-医学图像-matlab
- sasl-0.2.1-cp37-cp37m-linux-x86-64.whl
- 目标整理一份高质量的大模型古诗词数据集,涵盖先秦到现代.zip
- sasl-0.3-cp39-cp39-manylinux-2-5-x86-64.manylinux1-x86-64.whl
- C# winform 基于OPC数据采集的报表项目(源码+sql文件)详情看我的文章介绍
- 研究一下大数据支撑下的股票科学.zip
- 将Hex文件转换为Bin文件的小工具(包含C#项目源码)
- 第二届百度&西安交通大学大数据竞赛.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0