views:

15416

answers:

28

Provide QUALITY books and an approximate skill level. Add a short blurb/description about each book that you have personally read/benefited from. Feel free to debate quality, headings, etc. Books that meet the criteria will be added to the list. Books that have reviews by the Association of C and C++ Users (ACCU) have links to the review.

Note: FAQs and other resources can be found in the C++ tag info and under the c++-faq tag.

There is also a similar post for C: The Definitive C Book Guide and List

Reference Style - All Levels

  1. The C++ Programming Language (Bjarne Stroustrup) The classic introduction to C++ by its creator. Written to parallel the classic K&R, 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 language's philosophy. (Thereby making the latest editions break the 1k page barrier.) [Review]

  2. C++ Standard Library Tutorial and Reference (Nicolai Josuttis) The introduction and reference for the C++ Standard Library. [Review]

  3. The C++ IO Streams and Locales (Angelika Langer and Klaus Kreft) There's 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]


Beginner

Introductory

If you are new to programming or if you have experience in other languages and are new to C++, these books are highly recommended.

  1. C++ Primer† (Stanley Lippman, Josée Lajoie, and Barbara E. Moo) 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. [Review]]

  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. So it comes with quite a steep 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.) [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)

† Not to be confused with C++ Primer Plus (Stephen Prata) [Review]], a significantly worse book.

Best practices

  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 rational 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]]


Intermediate

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

  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 in Exceptional 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 doesn't 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 C++ templates. 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. [Review]]


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. [Review]]

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


Classics / Older

Note: Some information contained within these books may not be up to date or no longer considered best practice.

  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 were 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". 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. 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. There's 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.

+1  A: 

Wrox Press Beginning C++: The Complete Language by Ivor Horton

ctacke
+28  A: 

About C++ Templates The Complete Guide

I can only say good things about it. Written by two top experts. And you really notice that. The examples are well written, explained and placed.

They start by teaching you the basics on a few pages. Then they talk about all the pitfalls and hidden danger there is in template programming and the cool stuff that can be done with them. At the end, they explain in detail the overload resolution and the one definition rule in Appendix A and B.

Strongly recommended :)

Johannes Schaub - litb
Yes my favorite section of this book is the discussion on Policy Based design , which Alexandrescu uses heavily in Modern C++ Design.
grepsedawk
can u write abt Modern C++ Design
yesraaj
This was the book that opened my eyes and made me realise how much I hated C++
Brent.Longborough
+1: this is probably the best book for understanding how to use templates.
D.Shawley
+19  A: 

I'd add C++ FAQs to the Beginner list. I find it highly readable, enjoyable, and a succinct summary of a lot of material in "The C++ Programming Language" and the "Effective C++" series of books.

Nocturne
+7  A: 

New book by Stroustrup Principles and Practice Using C++ should be a great beginner book.

I will save judgment on this book until it is officially released :)
grepsedawk
Out, and I'm impressed with the parts I've read yet.
David Thornley
It is a very good book and very impressive that covers a lot of fields
Nikko
+6  A: 

For the 'classics' section I'd like to recommend, John Lakos "Large Scale C++ Software Design". It's quite an old book but it occupies a niche that no other C++ book I know of covers. Probably Intermediate, and if you're working on a big codebase, you'll have to have this book.

I'd also like to recommend Stephen C. Dewhurst's "C++ Gotchas" for the Intermediate developer. It falls into the same category as Herb Sutter's Exceptional C++ books, only with slightly more emphasis on how to avoid shooting yourself in the foot.

Timo Geusch
+11  A: 

I think Bruce Eckel's Thinking in C++ volumes really stirred me.

http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html

Kezzer
They are great as introductory books and for the discussions about OOP. But beware that they can't be used as a reference guide - they traded that off to be of the "tutorial" type (well, a great tutorial anyway).
Blaisorblade
Hands down the best C++ tutorials ... all other pale in comparison.
bias
Really great books. I started with it because it was the only free book available, but it turned out to be a great choice for getting me on my feet with C++. Just started the second volume and I'm looking forward to learning from it.
Maulrus
Volumes? Is there really that much "introductory" c++ to write about?
kirk.burleson
+20  A: 

Large Scale C++ Design, by Lakos

I'd say intermediate level, in any case, read it before you start/join your very first large project (whichever level you're at)

Pieter
He was supposed to be bringing out an update version of this book in 2007. However it never arrived. He was at ACCU 2008 which I unfortunately missed. If he was I would of asked him what happened to the book.
graham.reeds
I find the book too verbose and therefore difficult to maintain focus. I would better go for the notes at http://www.mpi-inf.mpg.de/~kettner/courses/lib_design_03/notes/large.html
Amit Kumar
+1 for Lakos. Outstanding book.
Andrew
I read the book back in 1999, and found it a good read back then. It is worth reading now to get a good feel for "dependency heirarchy."but this is 2010. LSC++D is wayyyy outdated. Written in an era when even a modest C++ program could take 8-10 hours to compile and link. 95% of the issues addressed are obsolete.I have read the drafts for the second book a few years ago. Basically the manuscript was focussed on why every change to C++ in the past 15 years is harmful. Namespaces, exceptions, templates, the STL, none of these pass muster. Hopefully the MS has improved since then.
Lance Diduck
I agree with Lance Diduck, it's obsolete. An interesting read though, but with a critical mind.
Nikko
A: 

Even though you said C++, I would add K&R C (The C Programming Language, by Brian Kernighan and Dennis Ritchie). After all, good C code is (almost) valid C++ code as well, and knowing K&R/ANSI will provide a better understanding of C's roots. Plus, it's simply an excellent example of a clear and concise programming book.

Matthew Flaschen
No. Although it's a great book C++ is definitely not C.
Jonas
+2  A: 

If what you're looking for is a fairly complete reference, I like C++ in a Nutshell. I have found it to be more complete and more to the point than "The C++ Programming Language" (which I guess is the point of the Nutshell series). However, it is definitely not for the beginner.

zdan
+9  A: 

C++ Common Knowledge by Stephen Dewhurst belongs in the Intermediate section, but just barely. The coverage of templates gets into advanced material near the end.

Stephen W. Carson
A: 

Data Structures in C++ using STL

This was a textbook for a data structures class I took and one of the few that I considered good enough not to sell back at the end of the semester.

A: 

In spite of being stated beforehand, It is fertile to reiterate Stephen Dewhurst's 2 books:

C++ Gotchas: Avoiding Common Problems in Coding and Design

C++ Common Knowledge: Essential Intermediate Programming

and Danny Kalev's constantly updated e-book:

C++ Reference Guide

Lastly, Don't you think you should add in that list Herb Sutter's other book as well and the best Boost introductory book that exists?

Comptrol
+1  A: 

I would also recommend

C++ in a Nutshell by  Ray Lischner

Its is quite precise and for intermediate programmers. Good for interview preparations.

Alien01
A good resource, but hasn't been updated in a long time. It's no replacement for Stroustrup.
sheepsimulator
A: 

there is a similar thread here:

Comptrol
... which was closed as a duplicate.
Georg Fritzsche
+5  A: 

I would like to recommend "Inside the C++ Object Model" by Stanley Lippman. It explains well how C++ object works under the hood. Knowing these details is a must to be a good C++ programmer.

Patrick Tsai
+2  A: 

I got C++ Cookbook as a birthday present and like it a good deal. It's a very practical book, with code examples ("recipes") to solve specific problems. Each recipe is explained in detail by breaking the code down and showing why things have been done a certain way. Many recipes show you how to do things using STL and/or Boost, and sometimes how to roll your own.

Scottie T
+1  A: 

I personally really liked Professional C++ as an intermediate or maybe advanced book. It has a great intro without going too basic, great coverage of pointers, STL, even frameworks to use for certain scenarios.

Simara
This book sucked, i couldnt read it after first 3 chapters.
vehomzzz
+2  A: 

The Annotated C++ Reference Manual by Margaret Ellis and Bjarne Stroustrup should be listed under classics.It is still very well regarded almost 20 years later, though somewhat dated.

Dave Mooney
+2  A: 

STL links at www.stepanovpapers.com especially http://www.stepanovpapers.com/Stepanov-The_Standard_Template_Library-1994.pdf and http://www.stepanovpapers.com/STL/DOC.PDF

Ram
+2  A: 

Most of what is improtant is already there:

I would add

C++ Coding Standards: 101 Rules, Guidelines, and Best Practices By Herb Sutter, Andrei Alexandrescu

=> Reference probably. Distilled items from Gotchas, Common Knowledge, Lakosm ,etc.

Imperfect C++ Practical Solutions for Real-Life Programming By Matthew Wilson

=> Intermediate, I guess. Has a refreshing approach to it (real-life, what he said)

regards martin

edit: oh, the 101 book is already up on the list, sorry

A: 

I wouldn't recommend either Effective C++ or More Effective C++. Reading these books lures programmers into believing that all those fun (really?) stuff in C++ are the important things you should learn or focus on, while the reality is quite the opposite - basic programming rules, basic traps and pitfalls, clear understanding of data-structure and algorithms, clear & clean code, even basic principles such as DRY and KISS are more important than some code trick you'll never gonna need to use for another 10 years (likely forever).

Stop wasting your precious time on useless workarounds (maybe somebody likes to call them tricks or even - more fancifully - 'techniques'); instead, use the time saved from this to learn new languages (you should at least learn one FPL and one Imperative Programming Language), to learn how to write clean and solid code, how to cooperate with coworkers, even how to write documents are more useful than the dusty language tricks.

pongba
A: 

I think its good to read "Inside C++ object model" at intermediate level. It clears out lots of things before going to above intermediate level

Unicorn
A: 

C++ gems is also good. Although a little old but enjoyable.

Yogesh Arora
+4  A: 

Are Deitel and Deitel's series of "C++: How to Program" books not regarded highly?

Matt
+3  A: 

I don't know what it's worth, but there's a book available on Stanford's CS106B - Programming Abstractions web site in PDF format. The site is here:
http://www.stanford.edu/class/cs106b/

You can download the book by clicking the "Course Reader PDF" link to the right. The book is called:
Programming Abstractions in C++
Eric Roberts & Julie Zelenski

JDelage
+1  A: 

I haven't read much (unfortunately), but I really enjoyed Navigating C++. It had some great tips and tricks that was simple but yet those you never think of. What I also remember is the exception handling and that they had a great boilerplate that could be used for any class (I read it 3-4 years ago..)
I don't have any concrete examples, but the link goes to Google Books which describes it pretty good

Default
+1  A: 

I'm surprised that nobody mentioned Practical C++,it's a very good book if you want to learn something about software engineering and design

Phobia
A: 

Refactoring to Patterns. The examples are in Java but the subject is important enough and easily translatable to C++ to warrant reading after the classic Refactoring and Design Patterns by GoF.

ZiKat
Yuck, patterns. :)
GMan