• Advertisement
Sign in to follow this  

Accelerated C++ or Programming principles and practice using C++?

This topic is 1735 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Which book would you recommend for a beginner to C++? I've programmed in Java for a while and want to learn C++ now. Which book would be best for me to learn from?

Share this post


Link to post
Share on other sites
Advertisement

Accelerated C++, by far. It's even better if you have experience with another language (like Java :))!

 

Programming Principles and Practice using C++ might be better once you have a firm grip of C++.

 

Cheers :)!

Share this post


Link to post
Share on other sites

"Accelerated C++" moves at a faster (IMO: optimal) pace and works great if you have programmed before (in any programming language). OTOH, it doesn't cover C++11.

"C++ Primer" covers C++11 and follows a similar approach to the "Accelerated C++" (useful/modern stuff first, note that it shares a co-author), but it goes into more detail (and, consequently, moves at a slower pace). Both have the same target audience -- folks who have programmed before in any programming language (including but not limited to C, pre-standard/older-standard C++, Java, C#, etc.) and want to specifically pick up knowledge of modern C++.

 

"Programming: Principles and Practice Using C++" is an introduction to programming (that happens to be using C++) for those completely new to programming (i.e., if you have never programmed before, don't know what a variable or a for loop is) -- it's great in its category, but I don't think you're in the target audience (given that you've programmed before) and consequently it may be moving too slow for you (that being said, it's the only one that covers GUIs, in Chapter 12, which happens to be freely available [PDF] -- a feature not in the C++ Standard, but nonetheless supported by countless libraries)

 

For more, see also:

http://isocpp.org/get-started

http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

Edited by Matt-D

Share this post


Link to post
Share on other sites

For someone who is pretty much a beginner, "Programming: Principles and Practice" is the right choice. It starts simple and fluffy, but it's very long and does actually end up discussing a wide set of C++ features.

 

Accelerated C++ is good if you can already program at least a little bit in another language. It's pretty thin and doesn't try to cover all of the language. The upside is that it presents stuff in a beautiful, logical progression and considers important "simple" things deeply. For instance, the idea of invariants is introduced hand in hand with loops. Another thing that I really like is that the book does not even mention pointers and dynamic memory allocation before the reader is ready to be shown a realistic example of a situation where you need to use them.

 

C++ Primer does not have that attitude or elegance. It looks more like a large grab bag of "all the stuff in the language and hints of how to use them". Seems informative and decently high quality, but not the same thing.

 

I would recommend The C++ Programming Language (4th edition) above C++ Primer. By necessity, it is also a "all of the things" type of book, but I would say it has better structure, goes deeper and is more rigorous. TCPL 4e comes out 20th of May.

Share this post


Link to post
Share on other sites

I'm not sure what I would recommend to a beginner, but once you are no longer a beginner and want to become better, Effective C++ is about the best 50$ you can ever spend!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement