Accelerated C++中文版

[美] Andrew Koenig, [美] Barbara E. Moo

出版时间

2008-01-01

ISBN

9787111224044

评分

★★★★★
书籍介绍
这本书最独特的地方,在于它一上来就抛弃了'先学C语法再过渡到C++'的老路,而是直接带你用标准库写地道的C++。读者普遍反馈:这种'以实例拉动语言'的写法让人耳目一新,很快就能写出像样的程序,被许多人称为'学习C++的思维启蒙书'。但争议也随之而来——部分读者觉得它过于简洁,类似K&R C,巧妙的表达式缺乏铺陈,后半段深入时容易跟不上,需要搭配其他书籍补充。因此它特别适合已有其他编程语言基础、想快速建立现代C++思维方式的人;而对零基础的纯C初学者,可能会在过渡期感到不适。它不是一本面面俱到的工具书,而是一条通往标准库与泛型思维的高速通道。
作者简介
Andrew Koenig,AT&T大规模程序研发部(前贝尔实验室)成员,同时也是C++标准委员会项目编辑。他有30多年编程经验,15年C++开发经验,已发表150多篇与C++有关的论文,应邀在世界各地多次演讲。曾编著《C Traps and Pitfalls》一书,并与妻子合著《Ruminations on C++》。 Barbara E. Moo,独立咨询顾问,在软件领域从业20多年。在AT&T工作的近15年中,参与了第一个使用C++编写商业产品的开发项目,负责管理公司第一个C++编译器项目,并成功指导开发了AT&T中屡获殊荣的WorldNet Internet Service Business。曾参与编写《Ruminations on C++》一书,并在世界各地进行过多次演讲。 Andrew Koenig 和 Barbara E. Moo 堪称C++研究领域的“第一神仙眷侣”,他们不光有着多年的C++开发、研究和教学经验,而且亲身参与了C++的演化和变革,是对C++的变化和发展起到重要影响的人。
AI导读
核心看点
  • 摒弃C风格,从标准库高级抽象入手
  • 以实例驱动教学,讲解精炼且巧妙
  • 涵盖容器、算法及类设计等核心内容
读者共识
  • 公认的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"
下载
收藏