ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Best way to start learning C++?

<< < (6/10) > >>

Eóin:
Which book shall I get?-superboyac (December 28, 2007, 06:01 PM)
--- End quote ---

When I switched from VB to C++ I found Complete Idiot's Guide to C++ very helpful. It takes you through the language and onto initial OOP concepts. That should be a good base to have, even if the course ended up using Java those basics should still be a big help.

ssb:
I've taught C and Assembly (and C++ later) at college. Twentyfive years later, I still read books about C/C++ (libs, adv techniques etc) discovering something new every day.
So my suggestion to anyone who wants to learn C/C++ is: "Don't expect to get it in a few weeks or months".
Get a few good books and consider some seminars or practice next to an experienced C developer. Despite what you hear, learning to code in C++ (and C) is not an easy task.

f0dder:
Learning to code in C++ is a relatively easy task.

Learning to write great code and understanding the language, however, is quite a task :)

ssb:
Learning to code in C++ is a relatively easy task.

Learning to write great code and understanding the language, however, is quite a task :)
-f0dder (January 03, 2008, 04:34 AM)
--- End quote ---

Exactly :)

CWuestefeld:
I can't believe that no one is asking what foundational knowledge we're trying to layer C/C++ on top of. (actually, I can't believe that no one is asking why the heck you feel you need C++ in the first place).

There are a few hurdles in C++ development: embracing real object orientation, dealing with pointers, and memory management.

If you've got an OO background from a language like java, or C#, then you might have this covered already. If not, I would suggest first learning one of these, because you'll get an understanding of OO without having to deal with that other hard stuff. Also, their syntax is an evolution of C++ (which is, of course, and evolution of C) so much of what you learn will be directly applicable. These languages also don't offer honeypots of unnecessary complexity like multiple inheritance or (as much) operator overloading, so you'll stay out of bad habits.

Once you've got the OO thing, I would suggest first wading into plain old C to get an understanding of pointers and basic memory management. I started learning C with the classic K&R - the nice, thin, well-written "The C Programming Language" by Brian Kernighan and Dennis Ritchie.

Then layer the C++ on top of that, getting the patterns of C++ memory management (with destructors, structured exception handling, etc.). I'm not sure where to tell you to go for a reference on this. I can tell you that what I did was wrong: if you just pick up Stroustrup's "C++ Annotated Reference Manual" (aka "The ARM") like I did (because that's the kind of reference I was used to for C), you'll immediately get lost.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version