C++ – Thinking in C++

c

The programming language I use has been Java. I've been transitioning to C++ which has been somewhat rocky. The "rocky-ness" isn't in the learning but more along the lines of "Thinking in C++".

I've seen many people say that you should learn C first (I technically know it already), and then I see people say no skip C and go straight to C++. Once again this isn't a "learning" problem; it's a "thinking in" problem; I know the syntax to C++, I know OOD in C++, etc.

For example this code in SDL I can explain it as if I know it but I cant really "take advantage" of pointers:

SDL_Surface* hello = NULL;

Should I be programming in C to get "used" to this? What should I be doing to get used to pointers if I've never used them coming from a language such as Java?

Best Answer

It's true that pointers are a big deal, and C and C++ share that concept.

But C++ is not just C with objects.

There are two free books that you can download from Planet PDF by Bruce Eckel called Thinking in C++ (volumes I and II) that will really help you get the sense of C++.

A lot of C++ also is the toolkit, whether it be the standard library (std) or MFC or the classes from the anti-grain geometry library or whatever. That too makes a difference.

If you need C++, go for C++. Learning C first is like learning Spanish so you can learn Portuguese, instead of just aiming for Portuguese.

Related Topic