Take the 2-minute tour ×
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

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 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, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

11  
6  
Stop looking for "the perfect book" and just go with what you have. –  Macneil Jul 12 '11 at 0:12
    
It's a very good advice, but I preferred to ask just to avoid to spend time with the wrong book ;) –  Overflowh Jul 12 '11 at 13:44
    
But you won't get practice in determining what is good for you or not if you always delegate that task. :-) This kind of stuff is highly subjective anyway and there will always be inefficiencies when it comes to learning very new things. –  Macneil Jul 12 '11 at 14:53
    
Of course! :) But I think that starting with a little field of opinion from other people that had the same problem is useful. I started reading Thinking in C++ about some weeks ago, and I think that is very easy-to-read, but I still preferred to ask for an advice. ;) –  Overflowh Jul 12 '11 at 15:24
show 2 more comments

12 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

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
add comment

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
add 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
add comment

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
add comment

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

share|improve this answer
add comment

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
add comment

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
add comment

Whoa! I have Thinking in C++ by Bruce Eckel and it is a very good. Excellent reference and just in the right pace for enjoyable learning. It goes over everything, so its a very good reference book. It helps you start a very strong foundation. I believe its still cheap to purchase ~$30 USD on amazon or ebay.

It has many examples if you are a Learn by Doing type. If you are familiar with other programming languages, you will enjoy this one.

share|improve this answer
    
like what Steve Fallows said, its also free online! which is super easy to use as a reference. but im always a fan of having a physical book –  nikeunltd Jul 11 '11 at 23:42
add comment

Thinking in C++ is, far and away, the best book on C++ that's available (legally) as a free download.

If you're thinking of buying a book, it's pretty good, but there are others I'd favor. Some of them are listed in the SO C++ book list. I wouldn't say I agree 100% with every word of what's in that list, but I think it's quite good overall, and there's little (if anything) with which I disagree very strongly at all.

share|improve this answer
    
Thank you mostly for the link of the C++ book lost! –  Overflowh Jul 12 '11 at 13:47
add comment

Thinking in C++ is excellent. However, for learning to think in the OOP paradigm, I recommend this one. It is sort of the cannon on learning how to actually use OOP. I have learned a ton from it. http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612

share|improve this answer
    
Added to wishlist ;) –  Overflowh Jul 12 '11 at 16:37
add comment

I don't know how it compares to Thinking in C++, but in my opinion, a good way to really get a handle on C++ is to see how it was designed and why it is the way it is. For that, I recommend finding an old copy of the The Annotated C++ Reference Manual (Ellis & Stroustrup). While it's a bit dated now (the standard has moved on QUITE a ways), it gives you a good insight into the intentions of the language designers. That, in turn, gives you a good handle on why the language is the way it is, and gives you a lot of leverage on understanding how it's really going to work day-to-day.

share|improve this answer
    
It's one of the things that I'll do when I'll have a good knowledge about C++. –  Overflowh Jul 12 '11 at 13:56
    
There are certainly people who are comfortable learning from reference manuals, but be aware that this is intended as a reference, not a tutorial. It is, as the name suggests, annotated, so it has rather more explanatory material than, say, the standard, but it's still primarily reference. For information about how things got the way they are, also consider The Design and Evolution of C++ (also by Stroustrup). –  Jerry Coffin Jul 12 '11 at 15:35
    
Ok, I added the book these books to my Amazon wishlist :D –  Overflowh Jul 12 '11 at 16:35
add comment

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