Take the 2-minute tour ×




To spell it out bluntly: There is no need to add a 75th answer to this question. If you feel like a book should be added, suggest it to the community and let's discuss it.


Reference Style - All Levels





C++11 References:









  4. Programming: Principles and Practice Using C++ (Bjarne Stroustrup) 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. (The 2nd Edition (updated for C++11) is coming.)


Best practices















Classics / Older








See the FAQ for more information.

share|improve this question
Please leave this question open. It has been discussed on meta multiple times and the verdict was that, despite this question not fully adhering to current moderation guidelines, it does more good than harm. Also keep in mind that there are — literally!thousands of links to this question all across the Internet. –  sbi Aug 21 '12 at 12:55
The ISO C++ website from its creator Bjarne Stroustrup's own students has rectified the anomaly cited as the cause for raising this question. –  Chawathe Vipul Jun 30 '13 at 17:35
show 5 more comments

50 Answers

About C++ Templates The Complete Guide.

I can only say good things about this book. It was written by two top experts and it shows; 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.

A second edition is scheduled for 2015.

share|improve this answer
Yes my favorite section of this book is the discussion on Policy Based design , which Alexandrescu uses heavily in Modern C++ Design. –  grepsedawk Dec 23 '08 at 5:54
This was the book that opened my eyes and made me realise how much I hated C++ –  Brent.Longborough Jan 4 '09 at 11:54
I enjoy the part where he discusses future trends. It is fun to see how just about all of these were realized in C++11. It seems that the more unlikely names for the features were chosen. –  emsr Jun 21 '12 at 19:23
To help find what you are looking for please help promote Area51 StackExchange Tutorials. –  JabberwockyDecompiler Aug 19 '13 at 15:37
There's a 2nd edition in the works, slated for July 2014. –  graham.reeds Sep 30 '13 at 15:49
add comment

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.

share|improve this answer
add comment

Large Scale C++ Design, by John 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).

share|improve this answer
I find the book too verbose and therefore difficult to maintain focus. I would better go for the notes at mpi-inf.mpg.de/~kettner/courses/lib_design_03/notes/large.html –  phaedrus Apr 10 '09 at 8:05
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 Apr 26 '10 at 16:42
The dependency heirarchy part is still highly relevant. We might not need 8-10 hours to compile anymore, but there are still a ton of projects that could benefit from compiling in one minute instead of 15 minutes or more. –  que que Jun 15 '12 at 18:04
show 6 more comments

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



share|improve this answer
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 Jan 14 '09 at 23:51
Hands down the best C++ tutorials ... all other pale in comparison. –  bias Mar 26 '09 at 22:49
show 2 more comments

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

share|improve this answer
Reading the author's pdf paper on the book on teaching experiences in college it seems like he wants to ensure that his baby (C++) is introduced in the right way to new-comers to C++. Thanks to him for making the effort to set things straight. –  GuruM Feb 17 '12 at 6:27
add comment

Most of what is important is already there.

I would add Imperfect C++ Practical Solutions for Real-Life Programming By Matthew Wilson.

It is intermediate level, I guess, and has a refreshing approach to it (real-life, is what he said).

share|improve this answer
I read this book when it was new. It's value was debatable even then, but it's very seriously outdated by now, almost a decade later. It refers to compilers from Borland and CodeWarrior, which have mostly disappeared, as well as GCC2.95 and VC6. And it recommends hacking your own stuff into the std lib headers. I am sorry, but that's a -1 from me. –  sbi Jan 26 '13 at 11:26
add comment

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.

share|improve this answer
I really like this book, however for a very long time I thought that there were topics that I just didn't know about. It turned out that the common knowledge isn't so common even among very season c++ programmer. Yes, most of the topics are known or should be known, but there are at least few that are either very sparsely used or no one bothers to learn them. Once again, I love this book so don't get me wrong. I'm just stating reality. –  ra170 Jan 31 '11 at 0:12
show 1 more comment

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:

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

You may also refer CS106L after completing cs106b

share|improve this answer
show 1 more comment

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.

share|improve this answer
add comment

STL links especially here:

  1. The_Standard_Template_Library-1994 and
  2. STL DOC.
share|improve this answer
I am not sure how an almost 20 years old text on the STL as it was before it got incorporated into the std lib (a process by which it was changed a lot) is still relevant for today. Just the other night, after browsing through it for an hour with a glass of wine in my hand, I decided that it is time to finally throw away the printout I still had of it. –  sbi Apr 15 '12 at 7:50
add comment

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.

share|improve this answer
show 2 more comments

What about this book?

Essential C++

by Stanley B. Lippman

It is structured in a few chapters by C++ programming paradigms:

Chapter 1. Basic C++ Programming

Chapter 2. Procedural Programming

Chapter 3. Generic Programming Chapter

Chapter 4. Object-Based Programming

Chapter 5. Object-Oriented Programming

Chapter 6. Programming with Templates

Chapter 7. Exception Handling

Appendix A. Exercise Solutions

Appendix B. Generic Algorithms Handbook

Also every chapter has a bunch of exercises.

share|improve this answer
I have read it. It is, essentially, Lippman's C++ Primer boiled down to a third of its volume. And it feels that way. Lippman knows what he's writing about, and the book will contain no serious errors, but it's not written as a 250 page introduction. Nevertheless, we C++ folks should be glad whenever there's a book out there that has all the facts right, and this certainly is such a book. So, yes, a recommendation from me, but with some reservation. –  sbi Feb 3 '11 at 21:17
A rather unflattering review: idinews.com/lippman2Rvw.html –  Happy Green Kid Naps Apr 30 '13 at 21:23
add comment

The Boost C++ Libraries, written by Boris Schäling, and translated to English by Andreas Masur provides an introduction to the Boost libraries. The first edition is available online under a Creative Commons license and covers Boost 1.42.0. There's a newer edition that covers Boost 1.47.0 (but this one is not available for free).

The book focus on Boost and only Boost. It assumes some C++ knowledge, but not too much, so I think it's a good book for the fledgling C++ student that after obtaining a grasp of the language wants to use Boost.

The book covers the most commonly used libraries, and describes each component with examples and enough detail to get you started using each of them. Obviously, given the sheer size of Boost, it can't go into excruciating detail over everything, so this is more of an introductory book than a full reference. Nevertheless, the book is still useful for Boost veterans that want to get started quickly with some part of Boost that they're not familiar with yet.

[Edit]: When it comes to Boost, there are two newer books:

Introduction to the Boost C++ Libraries; Volume I - Foundations

Introduction to the Boost C++ Libraries; Volume II - Advanced Libraries

The Volume one is similar with "The Boost C++ libraries" except that it covers more libraries. And also, in my humble opinion, it has some very good example code which are much better than the Boost docs pages and the book above. The drawback is that it's more expensive but I think the quality of the book worth the money.

The Volume covers some of the more advanced libraries in Boost, things like Math Toolkit, special data structures (Date & Time, Circular Buffer, dynamic bitsets, ...), ASIO and so on. Each of the libraries is discussed in detail with numerous working examples.

share|improve this answer
add comment

If you are an intermediate level programmer, like fresh out of college, used C++ for small kiddish programs but now started working on C++ projects, the first few chapters of the CS106B course of Stanford is a must-read. It refreshes your memory and neatly moves on to the advanced concepts. Amazing explanations and beautiful examples.

share|improve this answer
I assume you mean the public content available here: stanford.edu/class/cs106b –  Tony Feb 17 '11 at 13:51
show 4 more comments

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.

share|improve this answer
I have considered it, but then thought it's too old and really only of historical interest. I remember it being outdated in the mid-90s, when even D&E was still up to date. It's still a good book, but I doubt you could learn anything really important from it for writing C++ code nowadays. I am still undecided about it, but if you feel strongly it should be included, I wouldn't object if you added it. But if you do so, please explain that it is mainly of historical interest. –  sbi Apr 15 '12 at 7:39
add comment

In spite of being stated beforehand, it is fertile to reiterate Stephen Dewhurst's two 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?

share|improve this answer
add comment

For German readers, I can recommend the book by Prof. Ulrich Breymann "Der C++ Programmierer", Hanser Verlag, 2009. It's 950 pages cover all possible aspects of C++ from Hello World to STL, smart pointers, thread programming, overriding of operator new, etc. It benefits greatly by being a very recent book (and a standard text for German informaticians), so is targeted to the C++0x standard syntax. It is also a beautifully produced book, which makes for a pleasure to read.

I have coached and consulted in C++ in recent years and this is my constant companion and always my first recommendation.

share|improve this answer
show 2 more comments

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.

share|improve this answer
add comment

API Design for C++ by Martin Reddy. Good read after Meyers' Effective C++ and and Josuttis's The C++ Standard Library: A Tutorial and Reference.

share|improve this answer
add comment

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.

share|improve this answer
add comment

I think, while not primarily targetting C++, the GOF's Design Patterns - Elements of Reusable Object-Oriented Software by Gamma, Helm, Johnson, Vlissides should have a place here, since it teaches basics of solid software design, mostly using C++ for code examples, thus giving good insight into what to do with C++.

share|improve this answer
This is still a pretty decent book, IMO, despite it's age and all the pattern hate that has replace the pattern obsession in the 90s, but I don't think it should be included in a C++ book list. –  sbi Apr 15 '12 at 7:41
add comment

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.

share|improve this answer
add comment

The C++ language reference at MSDN.

It is a pretty good stuff: MSDN C++ language Reference

share|improve this answer
I would stay away from the MS-specific implementation of C++, known to be non-standard. Besides, that "language reference" isn't so well written. MS did quite a few good things (like C#), C++ development environment isn't one of them anymore. –  RedGlyph Aug 6 '12 at 18:08
@crazy_prog: No, people should read what teaches them good C++. What good does it do you if you understand a tutorial, yet it teaches you abysmally bad stuff? –  sbi Jan 26 '13 at 10:10
@crazy_prog: No, people should read what teaches them good C++. What good does it do you if you understand a tutorial, yet it teaches you abysmally bad stuff? –  sbi Apr 20 '13 at 20:19
show 3 more comments

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.

share|improve this answer
"The code examples are grossly out of date (were talking 1990's) and completely ruins the beautiful text by adding confusing, poorly written code examples to reinforce good literature." amazon.com/review/R3EJYU3ZE9XIUK/… I don't know if this is true, but if it is, then that's certainly bad. –  sbi Apr 17 '12 at 7:52
show 1 more comment

Beginning C++ Through Game Programming

     by Michael Dawson

Level: Beginner > Introductory

This book is written for the beginner, and assumes no previous programming experience.

Perspective: Game Programming

This book approaches learning C++ from a game development perspective.


   In this book, instead of the traditional "Hello World!" program, it teaches the following "Game Over!" version:

// Game Over
// A first Cþþ program
#include <iostream>
int main()
return 0;

share|improve this answer
I can say I've looked through most of it with a pedantic mind and I didn't find overly much to say about the correctness of information. I skimmed through some of the rest, but here's what I jotted down: pastebin.com/Qssamisr –  chris Jun 3 '13 at 1:25
add comment

FREE books about C++, design, data structures (excuse me if some of them are not so perfect or I repeat a book mentioned earlier - it is a C++ free book list):

Very good C++ and Java examples and an OPENSOURCE book about data structures

Next data structures book of Goodrich

Very FRESH about data structures

Design patterns in C++ and Java examples


Wiki C++ idioms

About boost C++ library


AVL trees book

C++ famous the first free book

For begginers C++

For begginers an old book

Wiki books: http://en.wikibooks.org/wiki/Optimizing_C%2B%2B


C++ book lists:



Free video lectures:


Unfinished online interactive tutorial on data structures in C, C++:


The beginning of all C++ ideas: http://www.stroustrup.com/

share|improve this answer
Please take cplusplus.com away from here. –  Bartek Banachewicz Apr 12 '13 at 7:49
OK, it is done, I haven't noticed it is this site. Can you explain me, why it is so hated? –  42n4 Apr 12 '13 at 7:54
@42n4 Can you explain me, why it is so hated? For the same reason this question is here for :) –  PHI Aug 26 '13 at 4:07
@PHI What does that even mean? –  Koray Tugay Nov 19 '13 at 19:15
show 1 more comment


Elements of Programming

This short (but dense) book has a remarkable mix of abstract algebra (e.g. chapter two is dedicated to "Associative Operations") with the concrete algorithmic implementations in relatively short C++ code snippets (abstracted via templates, of course).

share|improve this answer
add comment

For self-taught knowledge of computers and C++, I was really fond of Neil Grey - A Beginners C++ especially since the entire thing is available for free as a series of PDF's (here) - which makes life so much easier when you want to copy paste code for exercises or templates.

When learning about a subject, I like the Wikipedia-style version. There aren't a lot of long-winded introductions, anecdotes and tangents. These make for nice novels, or introductory books for people who aren't really that interested in the subject - but if you want to get down to brass tax and dense facts, this is a great reference.

One of the uniquely useful parts about this book is how is has a column running down the side of every page containing key words referenced in that section - in addition to the usual section headers and running page headers that tell you where you're at. The sections are organized in what is, to me, the most logical approach - a crash course on computer hardware, followed by machine language, and then higher level language, algorithms, design paradigms, OOP, etc. It also gives well annotated examples of code from practical applications, such as air traffic control software - and does a good job of underlying the real world importance of best practice principles like information experts, modularity, and documentation.

It's survived so long for being mostly IDE agnostic, but I wish someone would go back and take out all those embarrassingly outdated references to Borland.

share|improve this answer
show 2 more comments


share|improve this answer
This lists libraries that are now part of the C++ library since 2003. No matter whether it's good (I believe it is), it's seriously outdated. –  sbi Apr 15 '12 at 7:15
Rest assured, @Pete, that I really like your book. In fact, having recently started on a new job employing C++03 on an embedded platform, I just had them buy one (because I don't want my private copy to be used for work), and I use it almost daily. That does not mean, however, that it warrants an unreserved recommendation to beginning C++ programmers in 2013. (Hint: I don't think the community would mind to have two great std lib books to pick from, though. :) ) –  sbi Jan 26 '13 at 10:17
show 1 more comment

Optimizing C++ | Wikibook freely downloadable

From the webpage:

This book is for intermediate C++ programmers (i.e. studying C++ for at least one year) who want to improve the performance of the software they develop.

This book contains guidelines and advices on how to write efficient software using the C++ language. Software correctness and maintainability are taken into account, but are not the primary concerns of the guidelines. Most of the guidelines presented are not platform specific, and so are applicable to every processor, to every compiler, and to every operating system; the few platform specific advices try to cover most platforms."

share|improve this answer
add comment

protected by Robert Harvey Apr 16 '12 at 17:10

