Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This question got me thinking. I would say I am a pretty experienced C++ programmer. I use it a lot at work, I had some courses on it at the university, I can understand most C++ code I find out there without problems.

Other languages you can pretty much learn by using them. But every time I use a new C++ library or check out some new C++ code by someone I did not know before, I discover a new set of idioms C++ has to offer. Basically, this has lead me to believe that there is a lot of stuff in C++ that might be worth knowing but that is not easily discoverable.

So, is there a good book for a somewhat experienced C++ programmer to step up the game? You know, to kind of 'get' that language the way you can 'get' Ruby or Objective-C, where everything just suddenly makes sense and you start instinctively knowing 'that C++ way of thing'?

share|improve this question
10  

closed as not constructive by Mark Trapp Dec 8 '11 at 4:28

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

8 Answers

There is obviously Bjarne Stroustrups "The C++ Programming language". After all, he developed the language. It covers the whole language, though not going into too much details. But after reading it you'll know, what you're missing and can get some more books on topics you found important.

Then the ISO/IEC 14882 C++ standard. Though that's a hard text to read.

Bruce Eckel Thinking in C++ is a good read and it's for free.

Scott Meyers: "Effective & More Effective C++" and "Effective STL".

Herb Sutter "Exceptional C++" and "C++ Coding Standards". Invaluable.

Marshall Cline C++ faq. Will tell you everything about common pitfalls. Free online.

Another good resource for learning are the questions at stackoverflow (and similar sites). You can get a good feeling of real world problems by reading them and reading the answers.

share|improve this answer
+1 for The C++ Programming Language. I still find myself going back to it fairly frequently after using the language extensively for several years. – mummey Jan 23 '11 at 17:27
1  
+1 for anything Scott Meyers ever wrote. He preaches a pragmatic approach/style to C++ – Henry Jan 24 '11 at 0:13
1  
+1. A comprehensive answer, complete all those books and be a C++ champion. Of course there is no substitute for experience. – Geek Jan 24 '11 at 12:47
1  
I've read all those books, some more than once (okay, I never read through the entire Standard). I still don't feel like I grok C++. I'm not saying anything against those books, but C++ is an awful big thing. – David Thornley Jan 24 '11 at 15:25
@David: You didn't miss really that much with the standard.Most interesting points are cover by Stroustrup.But it gives a good feeling about at least having heard about everything. You can read through many books and think you know C++, but later find out, that they never even mentioned templates. – thorsten müller Jan 25 '11 at 4:20
show 1 more comment

When I was learning C++ a few years ago, my biggest problem was that there was so many tools available that I had no idea when to use them or how to use them most effectively. Then I read Accelerated C++. The book starts with basic code, then using templates and classes, then designing templates and classes. After reading the book, I felt like I finally "got" C++. I then decided that I didn't want it, but that's another story.

share|improve this answer

I find that "Effective C++" series by Scott Meyers is the best way to enhance your C++

share|improve this answer

Accelerated C++ is a great introduction to C++ which emphasizes the Standard Template Library from the first chapter. It's not overly long (about 270 pages) but is very "dense" with information.

I haven't seen any other C++ book that takes this approach of teaching C++, and as the book mentions, it will show you how much you can do with the STL without the need for raw pointers (which aren't even mentioned until about halfway through the book.)

Since anyone writing modern/new C++ code would be well advised to avoid using raw pointers whenever possible (via wrapper classes if nothing else) this approach makes sense IMO.

Since you already have a solid C++ background, I think you'd benefit from this book's perspective on the language (I certainly did.) For others reading this response - if you are already familiar with some other programming language, I'd also recommend this book as a first or second book on C++.

Someone new to programming in general should probably get something a bit slower-paced to start, though.

share|improve this answer
Oh, I wish working without raw pointers would work on an embedded device. But stack constraints necessitate allocating most stuff on the heap and dealing with the pointers. – bastibe Feb 22 '11 at 8:40
1  
@Paperflyer: The keyword here is raw pointers! you should definitely read this book, you will be surprised at how far you can go without ever using them. And the abstraction penalty is non-existent more often than not, or if it exists it is smaller than you imagine. – Fabio Fracassi Nov 23 '11 at 10:27
@FabioFracassi: Well, I'll work hard to try to convince my coworkers to use STL instead of our homebrewn super-minimal implementation of lists, strings etc. As far as I know, the STL implementation on one of our embedded platforms was too buggy to be of much use last time they checked. But I'll try. – bastibe Nov 24 '11 at 8:14

Practical C++ is a good source for coding guidelines,it's both suitable for people who aren't familiar with the language,and those who have been using it for a long time

share|improve this answer
According to the Accu Book Review (which are -in my experience- very accurate) this book is considered more harmful than good! – Fabio Fracassi Nov 23 '11 at 10:34
@FabioFracassi This review is what got me to recommend this book, I've read some of it too, and I don't think it's that bad. – Mahmoud Hossam Nov 23 '11 at 20:57

The one and only way to grok C++ in its fullness is to read the standard front to back several times.

If, on the other hand, you want a practical understanding you can read the various recommendations of others here.

share|improve this answer

You need these 2:

  1. Inside the C++ Object Model by Lippman. Get it from here.
  2. The Design and Evolution of C++ by Stroustrup. This one offers a fascinating insight into why C++ is the way it is.

And nothing is complete these days without a talk about Template meta-programming. So:

  1. Modern C++ Design by Andrei Alexandrescu
share|improve this answer
1  
The Lippman and Stroustrup books, while excellent, are old. – David Thornley Jan 24 '11 at 15:25
1  
@David: Old is definitely gold in this case. – Fanatic23 Jan 24 '11 at 16:24
1  
However, learning all about C++ requires learning a lot of new stuff, and I don't think one book is adequate there. – David Thornley Jan 24 '11 at 16:30

My recommendations are :

Herbert Schildt: C++ The Complete Reference

INCITS/ISO/IEC 14882-2003 : Programming languages - C++

share|improve this answer
3  
Herbert Schildt books are not recommended. accu.informika.ru/bookreviews/public/reviews/t/t001453.htm, compgroups.net/comp.lang.c.moderated/… – talonx Jan 25 '11 at 6:22
thanks for that links – yeradis Jan 25 '11 at 17:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.