Sign in to follow this  
Cromulent

Best book for moving from C to C++?

Recommended Posts

I'm planning on spending some time picking up C++. I can already program in C, what is the best book to get me up to speed quickly? I think I need one which takes the time to run me through OOP as I have no real experience using it other than web projects using PHP 5 (which normally ends up being procedural anyway, rightly or wrongly). Any suggestions appreciated :).

Share this post


Link to post
Share on other sites
The C++ Standard Library by Josuttis.

Hopefully that will be sufficient for you to see that the transition from C to C++ is not really a transition. That C is (mostly) valid C++ is only going to be a hindrance to you. As if learning C++ didn't have enough hindrances...

Share this post


Link to post
Share on other sites
You can check out Thinking in C++, which is freely available in the link my sig.

However, if you are willing to spend money on a book (and from your post I assume you are), I would recommend getting Accelerated C++. It is perhaps the only introductory book that teaches modern usage of C++ from the very beginning, and it uses an approach that allows you to write interesting C++ programs very early. Read the reviews on Amazon for further convincing.

Share this post


Link to post
Share on other sites
Quote:
Original post by Cromulent
I'm planning on spending some time picking up C++. I can already program in C, what is the best book to get me up to speed quickly?

Hm, tough one. To write beautiful C++, you have to forget most of your C knowledge. These are some things you have to do in C, but shouldn't do in C++:

- declare all variables before the first statement
- manually allocate and delete memory and have pointers all over the place
- pass pointers by value
- use arrays as your primary container
- use the preprocessor to emulate generics

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this