Fog Creek Software
Discussion Board




C++ reference book recommendations

I'm looking for a good C++ reference book that also includes code samples of standard library functions.  The two I've heard cited most often are Stroustrup's Annotated Reference Manual and The C++ Programming Language.  If you have both, which do you reach for more often?  Or is there a 3rd you like better?

Nick
Thursday, May 29, 2003

The ARM has not been updated to correspond with the C++ standard, so it's rather obselete.  Strounstrup would like to be able to write a new ARM, but there's some issues that are putting that on hold.  More details are available at http://www.research.att.com/~bs/bs_faq.html

You can buy the exact standard from various standards bodies, or you can just use "The C++ Programming Language", which works reasonably well as a reference text.

Flamebait Sr.
Thursday, May 29, 2003

I once heard this from someone smarter than me: there are three types of books: "Legailty" books, "Morality" books, and "cookbooks".  Decide which type(s) of book you're looking for, and it will help you to find the right book.

Legailty books are something like Stroustrup.  Very good for answering questions, learning about features, etc.

Morailty books are something like Scott Meyers' Effective C++ series.  Very good for learning good practices and techniques.

Cookbooks are filled with example code that help get a feel for the language, etc.  (Someone else can recommend good C++ cookbooks.)

Michael Kale
Thursday, May 29, 2003

There are many ways to spell "Legality" and "Morality" too.  hehe ;-)

Michael Kale
Thursday, May 29, 2003

For the C++ language: the latest edition of Stroustrup's "The C++ Programming Language". Barely readable, but hey, it's the standard reference...

For the C++ standard library: the latest edition of Nicolai M. Josuttis, "The C++ Standard Library". Very thorough, lots of examples, and easier to read than Stroustrup, too.

How to use the C++ language: Cline/Lomow/Girou: "C++ FAQs", and anything by Scott Meyers. This includes "Effective C++", "More Effective C++", and "Effective STL".

By the way, the bets introduction to the C++ language is Koenig/Moo: "Accelerated C++".

Chris Nahr
Thursday, May 29, 2003

Round here, "The C++ Programming Language" by Stroustrop is nicknamed "The Bible"

regards, treefrog

treefrog
Friday, May 30, 2003

Advanced C++ Programming Styles and Idioms by James O. Coplien is worth a read.

Colin Newell
Friday, May 30, 2003

I'm making a recommendation by proxy of another book, so I highly suggest you read the reviews at Amazon before wholly listening.  I have recently (as of last night) fallen in love with my "Learn C Programming for Linux in 21 Days" book -- don't let the title fool you, I'm 8 or 10 "days" into it, and it's standard C that will work on any platform I know of.  I'm not using it in the 21 day timeframe, just as a reference book.  Reading it last night, it explained pointers in a way that I finally got it, and the exaples of structs were very nicely written.  They make a C++ book of the same title, which I have, but I haven't had a chance to get to it.  I'm just saying...  If the C++ is anywhere near as good as the C book, it's be worth investing in.

Andrew Burton
Friday, May 30, 2003

While the Coplien book is good, it is also very out-of-date, and it doesn't mesh with a lot of the modern strategies for writing C++ code using the standard library, including the STL classes and popular add-ons like Boost.

I personally agree with the Scott Meyers recommendations, and I also like "Modern C++ Design", although it is a very dense book, even for compiler writers like myself :)

Ben Combee
Friday, May 30, 2003

*  Recent Topics

*  Fog Creek Home