How long does it take to "learn" C++?

I ask this question question just out of curiosity, since I've been learning C++ for 2 months+ now and I still dont know much about templates and the STL (not to mention exceptions,WinAPI and type casting). I know it would take very long to actually master the language (several years perhaps). But I'm hoping I can finish learning templates and STL containers in a few weeks (I have no idea how difficult/easy they are) and perhaps begin some very basic graphics tutorials next year.

So how long did it take you to learn C++?

PS: When I say learn C++, I mean you are comfortable with designing simple graphical games in C++ and most other aspects of the language.
Last edited on
So how long did it take you to learn C++?

Indefinitely. I do it quite some time now, I earn my money doing it, I try to become better by reading books about it, and still I do get my share of WTFs per day. For example, look at the recent discussions here:
http://www.cplusplus.com/forum/general/4530/
http://www.cplusplus.com/forum/general/4444/
For making a game, you have to deal with numbers - lots of them, and in ugly situations. For problems, look e.g. here:
http://www.cplusplus.com/forum/articles/3827/

The above examples should show you that there is indeed enough rope provided by C++ to hang yourself and any programmer who comes after you.

But I'm hoping I can finish learning templates and STL containers in a few weeks

In a few weeks you can "learn" the whole standard, if you really want to. But in fact you won't have learned anything. Take your time, always practice what you have learned, and increase your knowledge as you go on. There is *always* a better solution than you have. So don't ever stop seeking it.
There is a book on templates ("C++ Templates. The Complete Guide") which is indeed quite complete. And one on the STL: "Generic Programming and the STL. Using and Extending the Standard Template Library". However, for both these books, you should be pretty familiar with the "basic" C++ language features (for an introduction to the STL, read "The C++ Standard Library: A Tutorial and Reference"; for an introduction of the basic language features read "The C++ Primer" by Lipman).
This is one of those questions Stroustrup gets tired of answering.
http://www.research.att.com/~bs/learn.html

The basic answer is: it depends on the learner.

I've been programming for 20+ years, and I have only recently begun digging very deeply into the STL and some of C++'s more functional aspects. But, that is because I hadn't used C++ very much before. Even so, I'm still learning new, cool stuff. That is to say, you never stop learning.

But you can become a very competent programmer in as short as, oh, six to nine months (IMO). The trick is just to get out there and mess with it, and to constantly be exposing yourself to new stuff to learn. If something goes over your head, put it aside for another day --you'll eventually get there.

At first it is very discouraging, C++ in particular because it, well, carries such a huge capacity. But if you stick to the basics you can do some really fun stuff.

Have fun!

Oh yeah, I endorse this message. (And exception's message too.) :-P
It is campain time here in the USA
That was a very interesting read there Duoas, I read every line with ever-growing enthusiasm.

And I'm not sure if this is the way you meant it, but C++ does have a huge capacity. There are so many things in my to-learn list right now (WinAPI,STL,templates,graphics/audio,and this new thing called little endian although I have absolutely no idea what that is :P).

I'll be sure to read those books exception. Heck, they were exactly what the doctor ordered, just what I wanted. I'm also sad to say I didnt understand a line of http://www.cplusplus.com/forum/articles/3827/
Okay maybe a few lines, but thats pretty much it, so I've got a looooong way to go before I reach intermediate level.

Thanks to both your replies, I feel that I'm wiser than I was ten minutes ago :)

PS:Have fun camping Duoas!
I have only been learning c++, part time, for about a month now. Sad to say I have not gotten very far, yet.

They say it take 10 years to master a skill.
Read this essay:
http://norvig.com/21-days.html?foo
Last edited on
I remember reading that one long ago when I was trying to learn BASIC. Sadly, I never got past printing text.
This is a very subjective question, as it depends (to a large extent) on what you mean by 'learn'.
It also depends on what other development experience you have.
The 'core basics' can be learnt fairly quickly (a few weeks) , particularly if you are familiar with programming concepts.
It is then a question of what you want to do using C++.
Using something like VC++ you can make simple GUI applications with not much more effort (since VC++ does the complex declarations for you).
If it's console apps only then you can look at using the STL, etc.
The thing is not to try and master everything at once - get the basics right, then build slowly on your knowledge - there are many, many ways to get C++ to go wrong - if there is only 1 new thing in your app, then you can concentrate on that as the likely source of the problem and learn how to corectly use the new concept. If there are 5 new things, you have no way of knowing which is right.
i think that everyone that has posted has provided some very worthy information. i have been programming windows apps for only a couple years now, and only started programming in c about a year before that. i'm writing a data software app for my dad right now, and one thing that i have found is that for every one thing that i learn or question i get answered, i get two or more back. especially with the advances, and the advent of the new c++ standard in 2009, it is certainly a never ending process.
the only other thing that i would like to say, is that it is not just about learning c++. it is only 1% learning c++ and 99% problem solving. as someone already said i believe, especially game design is VERY intensive, usually requiring knowledge about several subjects (c++, lua, directx api, etc.). it's not about what you know, but how you use it.

what you are using it for is also a deciding factor. object oriented concepts are especially helpful for writing games and providing code reusability. i highly recommend learning classes if you haven't. they are relatively easy to learn and provide incredible power and usability.

exception, i loved this comment because of it's truth: "There is *always* a better solution than you have. So don't ever stop seeking it."

basic things won't take that long....If you want to be a real pro, learning is something will not end...
Topic archived. No new replies allowed.