Accelerated C++

Andrew Koenig, Barbara E. Moo

出版时间

2000-08-24

ISBN

9780201703535

评分

★★★★★
书籍介绍
这本书最鲜明的特点,是它彻底颠倒了传统编程教材的讲法:不先从变量、循环、语法细节层层堆砌,而是让你一开始就面对真实的、完整的问题——读入学生成绩、计算并打印结果。它把高级数据结构和算法放在最前面,等你看到程序跑起来、获得正反馈,再带你“掀开机盖”,在真实语境里讲解内存管理、命名空间、流操作符等看似复杂的语言特性。多位读者因此评价它“从问题出发,而非罗列语法”,但也坦言:它并不适合零基础者单独啃读,最好与《C++ Primer》配合,或在具备一定编程经验后使用。如果你厌倦了“先背半年语法、再写第一行代码”的入门书,渴望尽快写出能运行的程序,这本书或许正是你要找的那本。
AI导读
核心看点
  • 颠覆传统教学,从标准库入手快速构建程序
  • 以实例驱动教学,强调实践而非死记语法
  • 深入剖析内存管理与异常处理等核心机制
读者共识
  • 被公认为最佳C++入门书之一,短小精悍
  • 实例贴近实际工程,比传统教材更实用
  • 中文版翻译质量参差不齐,建议参考原版
精彩摘录
  • "The int type is sufficient for rows because the number of rows depends only on the value of pad, which we control. Every C++ implementation is required to allow every int variable to take on values up to at least 32767, which is plenty. Nevertheless, whenever we define a variable that contains the s"
  • "C++ offers a way of saying that a particular name should always be interpreted as coming from a particular namespace. For example, by writing"
  • "we can say that we intend to use the name cout to mean std::cout exclusively, and that we do not intend to define anything named cout ourselves. Once we have done so, we can say cout instead of std::cout."
  • "Logically enough, such a declaration is called a using-declaration. The name that it mentions behaves similarly to other names. For example, if a using-declaration appears within braces, the name that it defines has its given meaning from where it is defined to the closing brace."
  • "By the same token, we do not bother to give an initial value to x, because the first thing we do with it is read into it, thereby obliterating any value we might have given it."
  • "Our goal is to write the final grade with three significant digits, which we do by using setprecision. Like endl, setprecision is a manipulator. It manipulates the stream by causing subsequent output on that stream to appear with the given number of significant digits. By writing setprecision(3), we"
  • "It is usually not worth the bother to use const references for parameters of simple built-in types, such as int or double. Such small objects are usually fast enough to copy that there's little, if any, overhead in passing them by value."
  • "Whenever we write a try statement, we must think carefully about side effects and when they occur. We must assume that anything between try and catch might throw an exception. If it does so, then any computation that would have been executed after the exception is skipped. What is important to reali"
用户评论
真是好书,读晚了
果然如介绍所说,单刀直入核心;只是数目编排方式不太习惯,一个例子讲到底,不断扩充,总是找不到前面想找的内容……
终究是从头到尾地读完了。有几点体会:中文版的错误不少,而且中文在描述不少概念的时候还是比较诡异,不如英文形象;作者的英文写的并不算“美妙”;这本书很难让我相信是为初学者写的,即使我学过C,读起来还是磕磕碰碰,我觉得自己已经挺认真了,中间还回读过几章,仍然没有避免最后惨淡收场。比较大的收获只能算是基本建立了一个框架,重新学的时候会有点感觉吧
读了前两章,感觉很容易读懂,例程也很有意思,结合习题来看,这本书非常适合刚入门的C++的学习者。 p.s 简明而不简单,短小精悍,重视实践,是这本书的特色,看完这本书和C++Primer,加上一定的工程经验,可以去试试The C++ Programming Language了。
真心不知道这本书为什么评价这么高,读完后觉得这本书讲得不够清晰。读了好几本关于C++的,还没有一本能够让我产生读 K&R C 时的感觉。。。继续下一步喽~~
我的最佳C++入门书。
可能是最好的c++入门书,从零开始讲述了c++的主要概念,从问题出发,而不是简单罗列语法和细节,特别是解释的很详细。唯一的缺陷就是只有c98++,还需要自己再看一下c11之后的改变。
学习C++的第一本书,非常感谢当时的导师选择这本书作为教材。这是我的编程启蒙书,获益良多。
简洁清晰,适合有编程经验的同学,快速熟悉C++
通俗,易懂,不错的C++入门书
下载
收藏