[译] C++书籍终极推荐

Table of Contents

声明:

英文水平有限,加上在 stackoverflow 混的人,母语都带一定的地方色彩。如果你觉得有误,欢迎留言指正。

1. All levels

  1. C++程序设计语言 (Bjarne Stroustrup) <= The C++ Programming Language

    评:经典的C++入门教材。可以和 K&R 的那本相媲美,读起来感觉非常类似,它涵盖了所有 标准 C++ 语言的核心,面面俱到。 这本书我没有读过,不做评价。"K&R" 的那本书指的是《C程序设计语言》,堪称经典,这本书我有。读完之后,感觉挺全面的, 而且深深地可以感觉到一丝 UNIX 气息。

  2. C++标准程序库:自修教程与参考手册 (Nicolai josuttis) <= C++ Standard Library Tutorial and Reference

    评:C++ 标准库的介绍和参考手册 个人觉得这本书是每个 C++ 程序员的必备书籍,书如其名,就是一本手册。整本书都在讲述 C++ 库函数。 如果你想学习 C++ STL 的话,选择这本书先熟悉一下 STL 是一个很不错的选择。我看过 3 遍,每一遍都会有新的收获。

  3. The C++ IO Streams and Locales(Angelika Langer and Klaus Kreft)

    评:除了 C++ IOstream 和 locales 之外,几乎没有其他的涉及。如果你想知道关于 stream 和 locale ,这本书是你最好的选择。

    以前没听过这本书,我很少用 C++ IO 。习惯了 C 语言的格式化操作,总感觉 C++ 这块做的不好。

  4. The C++ Standard(INCITS/ISO/IEC 14882-2011)

    评:This, of course, is the final arbiter of all that is or isn't C++. Be aware, however, that it is intended purely as a reference for experienced users willing to devote considerable time and effort to its understanding. As usual, the first release was quite expensive ($300+ US), but it has now been released in electronic form for $30US – probably the least expensive of the reference books listed here. (个人没有能力翻译这段话,抱歉.)

2. Beginer

2.1. Introductory

如果你刚开始学习程序设计或者你有其他语言的使用经历,下面这些书籍高度推荐:

  1. C++ primer (Stanley Lippman, Josée Lajoie, and Barbara E. Moo)

    评:1000 页左右的厚度,非常周全的的 C++ 介绍,涵盖了语言的方方面面,讲解非常详细。

    我是在看完《C++入门经典》之后看的《C++ primer》,并且之前学过 C 语言和数据结构。觉得还是有一定难度的,后面的面向对象和泛型几乎没怎么看懂。 作为新手,这本书真的适合吗?我质疑。不过这本书的好是不可否认的,值得多看几遍。[针对第四版而言]

  2. Accelerated C++(Andrew Koenig and Barbara Moo)

    评: This basically covers the same ground as the C++ Primer, but does so on a fourth of its space. This is largely because it does not attempt to be an introduction to programming, but an introduction to C++ for people who've previously programmed in some other language. It has a steeper learning curve, but, for those who can cope with this, it is a very compact introduction into the language. (Historically, it broke new ground by being the first beginner's book using a modern approach at teaching the language.)

  3. C++ 编程思想 (Bruce Eckel) [Thinking in C++]

    评:一共两卷,第二卷大部分在讲解标准库,但是仍旧非常好。

  4. C++程序设计原理与实践 (Bjarne Stroustrup) => Programming: Principles and Practice Using C++

    评:非常好,不只是适合初学者的一本书。

2.2. Best practices

  1. Effective C++

    评:每个C++程序员都应该读的书。早期版本针对从 C 转到 C++ 的程序员。第三版做了修改,程序定位在向 java 这样的语言转变过来的 C++ 程序员。改善程序与设计的 55 个具体做法。 提升 C++ 功力必备书籍,真的很棒。

  2. Effective STL

    有这本书,但是没有读完,不做评价。

3. Intermediate

  1. More Effective C++ (Scott Meyers)

    评:比 Effective C++ 更多的规则,没有 Effective C++ 那么重要,但是仍旧很应该知道。

    我有这本书,感觉里面的内容比 Effective C++ 要更细节和深入,有一部分没有看懂。听不错的书。

  2. Exceptional C++(Herb Sutter)

    评:资源管理和在 RAII 中的异常安全。pimple idiom, name lookup, good class disign, 和 C++ 内存模型。

    看评价就很想读了,等发工资了,果断买。

  3. More Effective C++ (Herb sutter)

    评:Effective C++ 的补充,包括异常安全的主题。除此之外,探讨了高效 C++ 面向对象编程和 STL 的错误使用。

  4. Exceptional C++ style (Herb Sutter)

    评:讨论泛型编程编程,优化和资源管理。还优秀的展现了怎么用 C++ 非成员函数和单一职责原则 (single reponsibility principle) 写模块化代码。

  5. C++编码规范 (Herb Sutter and Andrei Alexandrescu) => C++ coding Standards

    评:编码规范并不意味着"在代码中缩进使用几个空格的问题"。这本书包含 101 个好的实践,风格(idioms),和常见的陷阱可以帮助你去写正确的, 易于理解的并且高效的 C++ 代码。

  6. C++模板:完全指南 (David Vandevoorde and Nicolai M. Josuttis) => C++ Template: The Complete Guide

    评:这是一本关于 C++ 模板的书籍。他涵盖了从最基础的到高级的模板元编程,非常详细的解释了模板的工作机理。 对 ODR(One Defnition Rule)和重载的解析过程。

    这本书我是在大二的寒假看的,当时刚学完 C++ 语言。可能是基础不够的原因吧,只看了全书的 1/3 ,即模板的基础部分,之后就没怎么看了。 尽管如此,那 1/3 的基础部分为我在之后的 STL 学习打好了基础,获益匪浅。想要学好 STL 的同学,一定要先去学模板,否则就相当于在被库函数。

4. Above Intermediate

  1. Modern C++ Design (Andrei Alexandrescu)

    评:这本书是高级泛型编程技巧开创性的书籍,引入了基于策略的设计,类型列表,和基本的泛型编程风格。 解释了有多少有用的设计模式(包括小对象配置器,仿函数,工厂,访问者,和多方法)可以使用泛型编程高效,模块化和干净的的实现。

    A groundbreaking book on advanced generic programming techniques. Introduces policy-based design, type lists, and fundamental generic programming idioms then explains how many useful design patterns (including small object allocators, functors, factories, visitors, and multimethods) can be implemented efficiently, modularly, and cleanly using generic programming.

    看内容就好像读啊!

  2. C++模板元编程 (David Abrahams and Aleksey Gurtovoy) => C++ Template Metaprogramming

5. Classics/Older

标注:这些书中包括的一些信息可能不再适合现在或者不再是最好的实践方案。

  1. C++语言的设计和演化 (Bjarne Stroustrup) => The Design and Evoution of C++

    评:如果你想知道为什么 C++ 语言成为现在这个样子,这本书会告诉你答案。这本书涵盖了 C++ 标准化之前的所有故事。

  2. C++沉思录(Andrew Koenig and Barbara Moo) => Ruminations on C++
  3. Advanced C++ Programming Styles and Idioms => James Coplien

    评:A predecessor of the pattern movement, it describes many C++-specific "idioms". It's certainly a very good book and still worth a read if you can spare the time, but quite old and not up-to-date with current C++.

  4. 大规模C++软件设计 (John Lakos) => Large Scale C++ Software Design

    评:Lakos explains techniques to manage very big C++ software projects. Certainly a good read, if it only was up to date. It was written long before C++98, and misses on many features (e.g. namespaces) important for large scale projects. If you need to work in a big C++ software project, you might want to read it, although you need to take more than a grain of salt with it. There's been the rumor that Lakos is writing an up-to-date edition of the book for years.

  5. 深度探索C++对象模型 (Stanley Lippman) => Inside the C++ Object Model

    评:如果你想知道虚函数表机制是怎样实现的和在一个多继承情况下,基对象是怎么在内存布局,这些怎么对性能造成影响。你可以找到这些主题的深入探讨。 正在看这本书,不是很好理解。如果你没有一定的基础的话,我建议先别看了,越看越乱。看完之后,才知道以前的很多理解都是有误的。 这本书翻译的不太行啊,有能力的话还是看英文版吧!

First created: 2012-04-03 13:37:00
Last updated: 2022-12-11 Sun 12:49
Power by Emacs 27.1 (Org mode 9.4.4)