views:

395

answers:

8

Hello all. I'm a "good" programmer. I know Haskell, OCaml, and other functional languages very well. I know also Smalltalk, Objective-C, and other OO languages. I spend my time on LtU, I know a fair amount about programming language theory and compiler design, and above all, I'm, ahem, incredibly brilliant.

That said, I'm also hungry, and I need a well-paying job. I'd rather not be doing web dev. So... What is the best book for me to get a solid knowledge of C++ as soon as possible? I don't want something that takes things slow, nor do I want something that tries to be "pragmatic". Rather, I want a relatively complete understanding of the language that I can go confidently into an interview with.

Any recommendations would be much appreciated.

+5  A: 

With your experience, go straight to Stroustrup's reference. (Neil Butterworth helpfully notes that this is called The C++ Programming Language and that you do not want the annotated reference manual which is now obsolete). Andrew Koenig's book is also very good. (Neil Butterworth pointed out that Andrew Koenig has written more C++ books than I have kept up with, and he helpfully remembered the right title: Accelerated C++.)

Also, in order to play nicely with the C++ crowd, you will have to read the Gang of Four book on Design Patterns. Otherwise you will not understand their occult vocabulary.

P.S. If you can relocate to Boston, New York, or Portland (Oregon), you can get a job programming Haskell or Caml.

Norman Ramsey
Stroustrup seems to have quite a few C++ books. Are you referring to "The Annotated C++ Reference Manual", "The C++ Programming Language", or something else entirely?
John Nowak
I should note that I am actually in New York, but I've not seen much available in the way of work. There's Jane Street, but ideally I'd have more than one option. Is there another company I'm unaware of here in NY? Thanks.
John Nowak
Sorry -- I meant "I've not seen much available in the way of functional programming positions." Of course there's "work"!
John Nowak
Credit Suisse, except I suspect they're in deep doodoo and not hiring. D.E. Shaw maybe. Otherwise you will find one or two people locked away in the back rooms of various banks. Fergus Henderson is at Google NYC, but I suspect he may have given up Haskell for the duration... You should post "who hires functional programmers in New York?", maybe as CW...
Norman Ramsey
Hm, very good. Thanks for the advice Norman!
John Nowak
Bad advice given here. The Annotated Reference Manual is obsolete and only of historical interest. You need The C++ Programming Language, commonly known as TC++PL.
anon
Also Andrew Koenig has written at least three books on C++. The one you want for learning is Accelerated C++, which is excellent.
anon
@Neil: Thanks for these corrections; I've updated my answer and deleted hte comment full of bad advice.
Norman Ramsey
Credit Suisse isn't in deep doodoo (http://www.guardian.co.uk/business/2009/apr/23/credit-suisse-banking-profits) but we're not hiring at the moment either.
Ganesh Sittampalam
+4  A: 

Does anyone truly know C++?

"Effective C++" by Scott Meyers teaches best practices, which is most of the effort involved in learning a language. Even for incredibly brilliant people.

Ubiquitous
Hehe me and my coworkers ask ourselves that pretty much every day. "If you think you know C++, think again" :)
Magnus Skog
A: 

Professional C++, by Nicholas A. Solter, Scott J. Kleper, is a good book.

It cover a large spectrum of C++ and it's applications. Plus, it include the C++ Interviews in the appendix A.

Hardly, though, a book can teach you C++.

Nick D
A book, no. Several books, yes.
anon
Exactly. Several indeed. I use many languages but its only with C++ that I can *always* discover a new book and dig into the language deeper. Huge and complex language. C++ is 3 to 4 languages combined into one.
Nick D
+2  A: 
eed3si9n
+1 for Modern C++ Design.
lothar
+2  A: 

What I think is a good progression for a high quality progression in C++ would be:

Learn the language: The C++ Programming Language 3rd Edition (Stroustrap).

Learn the STL: The C++ Standard Library a tutorial and reference.

Effective C++ by Scott Meyers

-- practice, practice, practice --

Beyond the C++ Standard Library: An Introduction to Boost (Paperback) C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond

piotr
+3  A: 
kenny
A: 

I recommend Accelerated C++. It's the book I'm currently using. It's very practical and helps you learn with practical examples and exercises. It's very light on the tediously basic programming concepts, which you probably already know.

http://www.acceleratedcpp.com

hahuang65
+2  A: 

Your criteria are quite contradictory - you want to learn C++ quickly and learn it well. Nobody can promise you that, knowing how large C++ has become. The best recommendation I know is here. To summarize, you need at least three books in order to learn C++ well: a legality guide, a morality guide and a programming by example guide. In other words, a book on what you can and can't do in C++, a book on what you should and shouldn't do and finally a tutorial style book.

My personal choice for the first C++ book that you read would be "C++ Primer" by Stanly Lippman et al., which is in its 4th edition. That is how I learned C++ and I can recommend it warmly.

However, I have a word of warning: don't expect that reading a book (or three books) will land you a job as a C++ programmer. Unfortunately, that is not how things work now. Unless you have C++ in your resume, most employers won't even give you a chance to prove yourself in an interview. I know, it's a Catch 22 situation - you need experience in order to get a job, but how do you get experience unless you already have a job. If you find a good solution to this problem, by all means let me know.

Good luck!

ajanicij
It is an excellent point about needing to be a C++ developer to become a C++ developer. :P
ceretullis