標籤:

在 C++ 學習過程中,哪些書籍值得一看?

希望能夠從不同階段,不同方面做出回答。


C++Primer

Inside C++ Object Model

The Design and Evolution of C++

這三本就夠用了,可以應付絕大多數的工作


說一下我看過的C++書

初期:

《C++ Primer》、《Effective C++》、《More Effective C++》、《Effective STL》、《C++標準程序庫》、《Exceptional C++》、《C++編程規範》

中期:

《C++程序設計語言》、《C++語言的設計和演化》、《深度探索C++對象模型》、《C++沉思錄》、《STL源碼剖析》

後期:

《C++ Templates》、《C++設計新思維》

初期的書主要講C++的基礎語法、慣用法

中期的書進一步理解C++的實現

後期的書是擴展視野的C++書

還有一些沒有看過,不過大家也都推薦的書《More Exceptional C++》、《Exceptional C++ Style》、《Imperfect C++》。

不過這些書都沒有覆蓋到C++ 11以及馬上到來的C++ 14。現在最好開始從C++ 11學習,看《C++ Primer》第五版。


C++ Primer -------- 基礎,可以從這本看起,以後可以當reference來查

C++ Standard Library Tutorial and Reference ------------ stl的基礎,可以當reference來查

Effective C++ ------------- 一些成熟的practice,避免犯錯

Modern C++ Design ---------------- template可以深入學習

C++ Template Metaprogramming ----------------- 同上

Inside C++ Object Model ---------------- 這本我覺得可以和標準一起看看,open source的code也可以參看一下

看完這些基本絕大多數純依賴c++ language的coding的工作應該夠了,然後再說一點,非zhuangbility,能讀英文原版讀原版。

上面有人說看書不如項目+blog,我建議樓主不要採納,短期內增加知識面和實際動手能力可以採用。對於中長期的技術學習,知識積累,個人認為好的書籍+paper+官方文檔+source code永遠是你獲取知識與其細節的最好方式。訂閱blog,作為擴充閱讀可以接受。走捷徑很難走遠。


謝邀~ 不過來了以後發現想推薦的書已經被大家說的差不多了。。以下幾本對我幫助很大的:

Effective C++

More Effective C++

C++ Template Metaprogramming

Inside C++ Object Model

The Design and Evolution of C++


在任何階段都推薦21天學會C++,然後寫代碼時永遠不用超出這本書以外的內容,然後把樓上推薦的書當教條,嚴格遵守裡面的規則


做一回搬運工吧。。。

==================分割線========================================

  • 針對各個層次的C++程序員的參考書
  1. A Tour of C++ (Bjarne Stroustrup) The "tour" is a quick (about 180 pages and 14 chapters) tutorial overview of all of standard C++ (language and standard library, and using C++11) at a moderately high level for people who already know C++ or at least are experienced programmers. This book is an extended version of the material that constitutes Chapters 2-5 of The C++ Programming Language, 4th edition.

  2. The C++ Programming Language (Bjarne Stroustrup) (updated for C++11) The classic introduction to C++ by its creator. Written to parallel the classic KR, this indeed reads very much alike it and covers just about everything from the core language to the standard library, to programming paradigms to the languages philosophy. (Thereby making the latest editions break the 1k page barrier.) [Review] The fourth edition (released on May 19, 2013) covers C++11.

  3. C++ Standard Library Tutorial and Reference (Nicolai Josuttis) (updated for C++11) Theintroduction and reference for the C++ Standard Library. The second edition (released on April 9, 2012) covers C++11. [Review]

  4. The C++ IO Streams and Locales (Angelika Langer and Klaus Kreft) Theres very little to say about this book except that, if you want to know anything about streams and locales, then this is the one place to find definitive answers. [Review]

c++11參考

  1. The C++ Standard (INCITS/ISO/IEC 14882-2011) This, of course, is the final arbiter of all that is or isnt 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 quiteexpensive ($300+ US), but it has now been released in electronic form for $60US

  2. Overview of the New C++ (C++11/14) (PDF only) (Scott Meyers) (updated for C++1y/C++14) These are the presentation materials (slides and some lecture notes) of a three-day training course offered by Scott Meyers, whos a highly respected author on C++. Even though the list of items is short, the quality is high.

  • 針對初學者

介紹:

如果你是一個編程方面的新手,或者有其他編程語言的經驗但第一次接觸C++的話,那麼強烈推薦一下的書籍

  1. C++ Primer * (Stanley Lippman, Josée Lajoie, and Barbara E. Moo) (updated for C++11) Coming at 1k pages, this is a very thorough introduction into C++ that covers just about everything in the language in a very accessible format and in great detail. The fifth edition (released August 16, 2012) covers C++11. [Review]

  2. Accelerated C++ (Andrew Koenig and Barbara Moo) This basically covers the same ground as theC++ 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 whove 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 beginners book using a modern approach at teaching the language.) [Review]

  3. Thinking in C++ (Bruce Eckel) Two volumes; second is more about standard library, but still very good

  4. Programming: Principles and Practice Using C++ (Bjarne Stroustrup) (updated for C++11/C++14) An introduction to programming using C++ by the creator of the language. A good read, that assumes no previous programming experience, but is not only for beginners.

有關編程技能的

  1. Effective C++ (Scott Meyers) This was written with the aim of being the best second book C++ programmers should read, and it succeeded. Earlier editions were aimed at programmers coming from C, the third edition changes this and targets programmers coming from languages like Java. It presents ~50 easy-to-remember rules of thumb along with their rationale in a very accessible (and enjoyable) style. [Review]

  2. Effective STL (Scott Meyers) This aims to do the same to the part of the standard library coming from the STL what Effective C++ did to the language as a whole: It presents rules of thumb along with their rationale. [Review]

  • 中級c++程序員
  1. More Effective C++ (Scott Meyers) Even more rules of thumb than Effective C++. Not as important as the ones in the first book, but still good to know.

  2. Exceptional C++ (Herb Sutter) Presented as a set of puzzles, this has one of the best and thorough discussions of the proper resource management and exception safety in C++ through Resource Acquisition is Initialization (RAII) in addition to in-depth coverage of a variety of other topics including the pimpl idiom, name lookup, good class design, and the C++ memory model. [Review]

  3. More Exceptional C++ (Herb Sutter) Covers additional exception safety topics not covered inExceptional C++, in addition to discussion of effective object oriented programming in C++ and correct use of the STL. [Review]

  4. Exceptional C++ Style (Herb Sutter) Discusses generic programming, optimization, and resource management; this book also has an excellent exposition of how to write modular code in C++ by using nonmember functions and the single responsibility principle. [Review]

  5. C++ Coding Standards (Herb Sutter and Andrei Alexandrescu) "Coding standards" here doesnt mean "how many spaces should I indent my code?" This book contains 101 best practices, idioms, and common pitfalls that can help you to write correct, understandable, and efficient C++ code.[Review]

  6. C++ Templates: The Complete Guide (David Vandevoorde and Nicolai M. Josuttis) This is the book about templates as they existed before C++11. It covers everything from the very basics to some of the most advanced template metaprogramming and explains every detail of how templates work (both conceptually and at how they are implemented) and discusses many common pitfalls. Has excellent summaries of the One Definition Rule (ODR) and overload resolution in the appendices. Asecond edition is scheduled for 2015. [Review]

  • 高級C++程序員
  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. [Review]

  2. C++ Template Metaprogramming (David Abrahams and Aleksey Gurtovoy)

  3. C++ Concurrency In Action (Anthony Williams) A book covering C++11 concurrency support including the thread library, the atomics library, the C++ memory model, locks and mutexes, as well as issues of designing and debugging multithreaded applications.

  4. Advanced C++ Metaprogramming (Davide Di Gennaro) A pre-C++11 manual of TMP techniques, focused more on practice than theory. There are a ton of snippets in this book, some of which are made obsolete by typetraits, but the techniques, are nonetheless, useful to know. If you can put up with the quirky formatting/editing, it is easier to read than Alexandrescu, and arguably, more rewarding. For more experienced developers, there is a good chance that you may pick up something about a dark corner of C++ (a quirk) that usually only comes about through extensive experience.

  • 骨灰級C++程序員
  1. The Design and Evolution of C++ (Bjarne Stroustrup) If you want to know why the language is the way it is, this book is where you find answers. This covers everything before the standardization of C++.

  2. Ruminations on C++ - (Andrew Koenig and Barbara Moo) [Review]

  3. Advanced C++ Programming Styles and Idioms (James Coplien) A predecessor of the pattern movement, it describes many C++-specific "idioms". Its 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. Large Scale C++ Software Design (John Lakos) 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. Theres been the rumor that Lakos is writing an up-to-date edition of the book for years.

  5. Inside the C++ Object Model (Stanley Lippman) If you want to know how virtual member functions are commonly implemented and how base objects are commonly laid out in memory in a multi-inheritance scenario, and how all this affects performance, this is where you will find thorough discussions of such topics.

===========================================================

from stackoverflow :The Definitive C++ Book Guide and List


《c++大學教材》挺不錯的


快速入門的話我覺的錢能那本C++教程深淺適中。拿來做acm,寫點小玩意足夠了。

更深入的,還是看其他人推薦的比較好吧。

吐槽一下,做C++開發的學習過程中要比JAVA開發更注重語言本身,而不是問題本身,這個風氣從何而起呢……


推薦閱讀:

C++ 在哪些設計原則的指導下,變得越來越複雜?
如何看待阿里2016校招研發工程師筆試題題目?
C++字元數組為什麼實際可用長度為定義長度-1?
內存池除了減少內存申請和釋放的開銷之外還有什麼提升性能或者方便之處?
如何設計一個真正高性能的spin_lock?

TAG:計算機科學 | C |