Beginner here ... How do I master C++ ? How long did it take you to master it ?How long before I can learn open_gl ? What books should I read ? And give me some books with excercises only thanks !
Beginner here ... How do I master C++ ? How long did it take you to master it ?How long before I can learn open_gl ? What books should I read ? And give me some books with excercises only thanks !
O_oHow long did it take you to master it ?
I'll let you know when I get there...
Soma
[Edit]
Accelerated C++
The C++ Standard Library
Effective C++
More Effective C++
Effective STL
Exceptional C++
More Exceptional C++
Exceptional C++ Style
C++ Templates
C++ Template Meta-programming
[/Edit]
“Salem Was Wrong!” -- Pedant Necromancer
“Four isn't random!” -- Gibbering Mouther
I'm at a medium level (and plateaued there due to lack of drive), but I think you can get a good grasp of the basic language features in a matter of months. The way I see it, OpenGL is entirely a beast of its own and you don't need to know advanced C++ at all to work with it. If you are new to C++ and aim for OpenGL mainly, I recommend you start familiarizing yourself with computer graphics (geometry, matrices) and OpenGL concepts (the shader pipeline) without worrying about the code/API yet. You eventually need to do this anyway, regardless of your proficiency in programming languages. Even if you skim the surface for now, it will accelerate your progress when you tackle the topic in more depth, because your mind will have already built a scaffolding for you to flesh out.
The C++ parts you need a good grasp of for OpenGL are those also found in C, namely: types, arrays, pointers, functions.
Make sure you only read/watch modern OpenGL 4 material, as the language underwent a significant change at that point. The web is full of old material that would mostly waste your time.
p.s. the often touted "OpenGL programming guide" is a terribly written book (in text and code) in my opinion, avoid.
I would recommend reading some books like Master of Doom, or follow John Carmack on Twitter and plenty other books and people to follow also. These guys will constantly tell you that they are still learning all the time, they are still making tons of mistakes, have many headaches and long hours over simple bugs.
Point being is that you could argue that you are always learning.
I've been doing C++ at my job, more-or-less full-time, for the last 8 years, and I'd say I'm far from being a "master," as you put it. I try to learn something new every day, and rarely miss that goal. Much of what I learn these days comes from reading posts on this forum, from veteran members such as Salem, Phantomotap, and Elysia. You'd be wise to read their responses to the various threads on this forum.
OpenGL is something you can start learning as soon as you feel comfortable with the language in general. Until you are completely comfortable with pointers, I wouldn't recommend working with any third-party library.
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
just about you think you got a good grip of things, the comitee releases a newer standard.. this cycle never ends (and it better not)!
one thing I do think many people are missing these days , is the low level memory managment - raw pointers, pointers to pointers, arrays and pointers, dynamic memory allocation etc.
many programmers think of this knowledge as C technics and therefor try to not tackle this knowledge directly
understanding this stuff (although you can always find a workaround) is a funamental step of understanding C++.
Last edited by Dave11; 05-30-2015 at 10:49 AM.
Why would you ever want to master C++ and not programming or computer science in general? Abstracting concepts into a series of computations is forever but like all things, hardware, languages, etc, are just finite.
Like, what will happen when quantum computers happen? "Mastering" C++ will have fundamentally proved useless because it'll be a "dead" language.
I've learned C++ for over a year, have read 2 of the books on Soma's list, and still suck :P. I don't think you can master "C++" because it's too nebulous and touches on too many things.
The best I try to shoot for is understanding enough of the language to be able to express concepts of the fields I'm interested in. Keep in mind a lot of the knowledge from those fields (graphics, GUI's, gaming, networking, ect) has nothing to do with the language itself. C++ is just a lens you can look through to view that knowledge.
Ideally I think you can learn OpenGL when you are comfortable enough with C++ that you can see through it to the concepts being expressed by OpenGL.
WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;
Most of that stuff you don't need to worry about most of the time because it's low level, and things like that tend to be abstracted. Furthermore, C++ tends to offer a lot of high level tools, so you don't often need this stuff.
I would argue, however, that understanding pointers is important (yes, including raw pointers; but not necessarily for memory allocation, but for aliasing data between different data structures). Arrays are a given too. But again, neither of these is limited to low-level memory management. Low-level memory management is something you rarely have to do unless you're implementing time sensitive containers or algorithms. So no, I don't think they're fundamental to understanding C++, but yes, they are indeed part of the language and has their place. It really depends on where you want to focus your efforts.
I like to at least divide programming into two areas: systems programming, which usually entails constructing various high-level objects and piecing together these to form a system. You usually don't need low-level memory management here. Then there's the close to the metal area which is all about optimizing performance and memory. This is where you really need low-level memory management knowledge. This is the area where you need to know and use the low-level constructs. This is my experience, at least.
Highly unlikely. For one, we don't know what quantum computing will even do to the world of computing. Then there's just the fact that there's tons of legacy code written in C/C++. That's not going away. IF, and I really emphasize the IF, C++ is going away, it's going to take at least 30+ years. That's a long time! And who is not to say that C++ will evolve with other languages to challenge the problem of quantum computing? We don't know, and we'll never know for sure until quantum computing hits. So that's a very big assumption.
You're not going to become "good" in a language if you've only studied it for a year. That's true of any language.
@Elisya : not trying to turn the discussion around, this is the difference (in my opinion) between just "knowing how to do stuff in C++" and "mastering C++".