What is the best approach for a Java developer to learn C++

I've taught C++ to Java people, even though I learned them the other direction.

Are you comfortable with C? If not, read Kernighan and Ritchie. Many many peculiarities of C++ are explained by the desire for C++ to be a "Better C" with C's basic expression syntax.

You should get Stroustrup.

I think well of Thinking in C++ by Bruce Eckels.

I've used The C++ FAQ Book, by Cline, Lomow, and Girou; I refer to it pretty often. Marshall Cline has C++ FAQ content on his site, too.

Update

You might also look at C++ for Java Programmers. I don't know the book but it looks decent.


My proposal would be to write highly pointer-based thing, like a linked list library, BST library, etc. The code should be STL-free, similar to pure C. You should build application using such library (eg. sort algorithms?) and learn how to deal with all the pitfalls which will for sure come up, if it's your first C/C++ code.

In my opinion the most important fundamental in knowing C++ is to understand pointers and low level memory representation of classes and structures. It's like an enlightenment after which everything is simple and clear ;)

Tags:

C++

Java