*** MOVED ***

NOTE: I have merged the contents of this blog with my web-site. I will not be updating this blog any more.

2006-07-08

Books on C and C++

Tarandeep asked me what books on C and C++ I would recommend for someone who knows a bit of each of these programming languages. My problem is that I do not generally like reading books specific to a given programming language. In addition, I do not know C++ properly enough to be able to discern a genuinely good book on C++ from a mere pretender. He still insists that I write down a list of such books. I am therefore putting this list as a blog post in the hopes that people more knowledgeable about such things would help him out. We did search for such lists on the web but I was frankly not satisfied with the lists that we could readily find.

Here are the books on C that I would readily recommend:
  1. "The C Programming Language", Second Edition, by Brian Kernighan and Dennis Ritchie.
  2. "Expert C Programming - Deep C Secrets" by Peter van der Linden.
  3. "C Traps and Pitfalls" by Andrew Koenig.
(See also: List of books recommended in the comp.lang.c FAQ.)

Here are the books on C++ that I think should be useful:
  1. "The C++ Programming Language", Third Edition, by Bjarne Stroustrup.
  2. "Effective C++", Third Edition", by Scott Meyers.
  3. "Essential C++" by Stanley Lippman.
I did not particularly like Stroustrup's book, but it served as a useful reference when programming in C++.

By the way, many people do not like "The C Programming Language" but I am one of those who just love this book. It is a short book that is always to the point and has examples that teach you a lot about computer programming techniques and style. I agree that you should already know a bit about computer programming to fully appreciate this book. It was the book that I used to learn C. I love all of Brian Kernighan's books in general. He is one of the very few authors who have actually imbibed the lessons from "The Elements of Style".

In India, we have a few books on C and C++ written by some Indian authors that are terrible in my opinion but that unfortunately have been mandated as text books in several colleges here. The result is that many of the graduates who have not been exposed to other books form extremely warped ideas about these programming languages and about things like pointers. Sad.

5 comments:

  1. I would recommend "The Waite Group's C++ Primer Plus, Third Edition" by Stephen Prata (there's a Forth Edition as well, but I havn't read it).
    It's more of a book on good style object oriented programming with examples in C++ than a book on C++ , but it seems like that was what you asked about. The book is aimed at people with some experience of programming, but not experts, so it should fit your friend.
    By far the best book I've ever read on programming, and even though I hardly program any C++ I have had lots of use of it.

    ReplyDelete
  2. The book on C++ I just loved -- almost as much as I loved the C programming language book -- when picking up the language was the 'Annotated C++ Reference manual' by Stroustrup and Ellis. It was a rare book, then, that went into a lot more of the 'why.'
    'Exceptional C++' is the other book I recall being pretty good.

    ReplyDelete
  3. I haven't read it, but 'Accelerated C++' by Andrew Koenig and Barbara E. Moo is apparently a very good introduction to C++, and I liked the authors' old CUJ column.

    If you're using the C++ standard library (not just STL), 'The C++ Standard Library: A Tutorial and Reference' by 'Nicolai Josuttis' is an excellent reference - I use it constantly.

    Finally I'd back up your recommendation of Scott Meyers's 'Effective' books, I learned a lot from them.

    A good source of book reviews for C and C++ is the ACCU site.

    ReplyDelete
  4. I would add 'Effective STL' to the list. The 'effective' series is great for people with short attention spans...Stroustroup belongs to another age

    ReplyDelete
  5. Modern C++ Design by A Alexandrescu is interesting. Wouldn't recommend applying the techniques described in the book without careful consideration however it is an eye opener into the C++ template mechanism (which is turing complete) and can be used to get the compiler to perform computation.

    ReplyDelete

Note: Only a member of this blog may post a comment.