Free professional C++ source code..

Pages: 12
Hello folks, I am rather new to C++. I tried to read several books and learn by doing but I don't know, I am not really motivated. After I learned how to handle classes and create header files I kinda slacked of a bit and now I kinda need to start from scratch again. Anyhow, I was looking for a professional C++ source code so I could learn a few things about C++ and such.

Plus, is there a way to motivate yourself? I did rather many C++ exercices and I tried to write my own programs every once in a while but none of these look like what I wanna actually do with C++ and it bores the hell outta me. I'd like to know when I reach a point where I can finally get-off the console programming and actually write simple good looking useful programs like a program with a nice layout and a textbox which reads everything you copy in that box (I know there are programs like that)

How did you learn C++? Did you take courses? Should I?

If you were discouraged by an intro to classes and header files, then professional grade C++ source is not for you right now. C++ can be a beast to learn, especially if it's your first programming language. It will take patience and tons of practice before you can get to the point where you fully understand how to create a GUI or work with a graphics API. I took a few courses in C++ a while back, which sucked completely. I knew more than the professor, which tends to be the case if the professor has no real world experience. I mainly learned from books, experimentation, and asking questions.

Let's start with this... What is the main reason you are interested in learning C++? What do you wish to get out of it? Are you looking to create games, business applications, etc...
Plus, is there a way to motivate yourself?
It varies from person to person. The easiest way to stay motivated is to work on interesting things. If you're working on a project of your own, you can pick something interesting.
For example, among my favorite subjects are parsing, implementing algorithms and data structures, and graphical algorithms. I'm currently writing a language that primarily produces graphical output.
I've read hackers make their jobs more fun by solving a more general problem than the one they're given.

I mainly learnt from books, one high school teacher, the Internet, and myself. Nowadays, I don't think it makes much sense to pay for a course, unless you want some sort of certificate or just can't learn on your own.

My advice is that you go take a look at SourceForge, pick a project that interests you, and play around with it a bit (with the code, that is).
Let's start with this... What is the main reason you are interested in learning C++? What do you wish to get out of it?


Well, I want to write AI, kind of. But not one of those lame chat AIs that look for keywords in your input and respond to that but you know, a "smart" AI.

And yes, I'd like to create games, as well. I am not naive enough to think that I'll be like pulling out a Crysis out of my hat in like a month or anything. But I did hope I'd get closer to game programming within few weeks. I tried to learn C++ for like , maybe two weeks and even though I am certain that I did make some progress it felt like I didn't get any closer to my goal and that kinda sucked.

I tried to find some amateur programmer clubs or something , work on a project with them but I can't find any.

Well, I want to write AI, kind of. But not one of those lame chat AIs that look for keywords in your input and respond to that but you know, a "smart" AI.
Oh, brother.
http://en.wikipedia.org/wiki/Strong_AI
My (uneducated) opinion is that nothing terribly useful will ever come out of that branch of CS.

I tried to learn C++ for like , maybe two weeks and even though I am certain that I did make some progress it felt like I didn't get any closer to my goal and that kinda sucked.
Well, I've been learning C++ for almost four years, now, and programming for more than five, and I'm nowhere near the point where I can write a bare bones rendering engine. Partly because that was never one of my priorities.
I tried to find some amateur programmer clubs or something , work on a project with them but I can't find any.

People are generally too retardedly arrogant to work together at the novice/intermediate level. "I can program; therefore I'm a genius." It's pathetic. It takes about 10 years to learn to program well (just like any other difficult skill). After that much effort, people tend to lose their arrogance, realizing that they are not so special, just experienced. Interestingly, it's through their misplaced arrogance that you can spot the pretenders.
My (uneducated) opinion is that nothing terribly useful will ever come out of that branch of CS.
lol

AI is a very difficult topic and extremely advanced programming. I have a book or two lying around collecting dust because I just couldn't muster the strength or attention span to dive into it too deeply. Basic AI is one thing, past a certain point and my eyes glaze over.

And yes, I'd like to create games, as well. I am not naive enough to think that I'll be like pulling out a Crysis out of my hat in like a month or anything. But I did hope I'd get closer to game programming within few weeks.


I don't want to discourage you from this, because honestly it's the only reason I went the C++ route. Don't expect to accomplish anything noteworthy in a few weeks, months, or possibly even a year graphically. For game development you really need to have a drive due to the immense amount of crap you need to be familiar with to actually create the game, C++, the various APIs at your disposal, scripting, the list goes on. When I first started learning C++, I laid out a plan, a set of objectives for each week that I wanted to accomplish. I remember my first long term goal was to stick a triangle on the screen lol...
It takes about 10 years to learn to program well (just like any other difficult skill).


I don't believe in this statement... I think noone truly does, otherwise why would he or she start programming?
Last edited on
otherwise why would he or she start programming?

It takes about 10 years to become an expert guitar player. So why would anyone bother to learn to play the guitar? It takes about 10 years to become a novelist. So why would anyone bother to learn to write?
The statement is "it takes ten years to learn to program well", not "it takes ten years to learn all there is to know about programming".
Rim, the best way is to start a project that is a little (or fine) bit above your current abilities...
But it has a project that will keep you interested, something that you really want to do, while not so terribly hard you'll get frustrated after the first 5234343 tries...

Start small, just not too small...

As for me, thats the way i'm learning...
Of course, am reading a book and have some of the basics figured down, but when I get tired of it, I open my project and break the cycle by learning about things not directly related to those I read on the book...

That way I keep my interest fresh (most of the time xD)
Last edited on
It takes about 10 years to become an expert guitar player. So why would anyone bother to learn to play the guitar? It takes about 10 years to become a novelist. So why would anyone bother to learn to write?


Hmm... I do not know enough about guitar players or novelists but... 10 years? That long?

Those who are reading these posts and have less than 10 years of programming experience (like myself), do you think your code is *not that good* just because you are inexperienced?
Last edited on
What does "well" mean? What I meant was to become an expert. It would take an infinite amount of time to "learn all there is to know about programming." But to become an expert it takes TEN YEARS. Deal with it, you fucking babies!

That norvig.com site supports my statement. I got my information from the book Outliers.

do you think your code is *not that good* just because you are inexperienced?

If you're "inexperienced" then your code is "not that good" by definition. I certainly wouldn't trust anyone with less than 10 years of experience with a critical piece of code.
^ Calm down :l

If you want to "learn to program"; then yes, it's going to take a long time.

There's a book you can buy called something like that.

Personally I learn by experimentation. I've gleaned over the tutorial on this website once or twice, but I learn by writing some code, trying it, seeing what it does, and then remembering it. But some people can learn by example.

My motivation is that I want to be good enough to create games. Not like Crysis or GTA as you said, but games with graphics more like the older Spyro and Sonic games. Those games didn't have the best graphics but the gameplay was excellent.
closed account (S6k9GNh0)
Hammurabi, it doesn't take 10 years to become an expert. I've been dealing with C++ for three or four months now and I know quite a bit theories and concepts in C++. Though I'm far from what you call an expert, I simply lack what one would call, "Real Experience". If someone has been making commercial and publicly well-known software for a year or two, I would say they know quite a bit about programming.

Some veteran programmers aren't experts at all actually. They're often quirky about what they code and force ruling upon others with bad code because they 'know more'. If you've ever ready The Daily WTF, this gives you real life examples on how this happens.

@ chrisname: 2D games aren't nearly as complex as 3D games today and I will mention that 2D games are running on a clock. It's fine if you make 2D games but please don't expect to start a career on 2D based games.
Last edited on
closed account (z05DSL3A)
This is one of those subjects that I never know whether to get involved with because people’s options vary so much and their own preconceptions effect there interpretation of your post. The point on how long it takes to learn C++/Programming is all rapped up in this effect.

Learning a language and learning programming are not the same thing. They are not mutually exclusive. When you start out, you have to learn aspects of each and progress them in tandem. At some point along the way you will have learnt most of what the language has to offer, but only a small part of ‘programming’.

So how long to learn C++; six month, a year? Depends how much time and effort you put into it. Then there is the new standard just around the corner, some more learning to do.

On to programming; what is it? Some people do not see the distinction between programming and the language used. One broad definition of programming might be ‘the designing and writing of computer programs’. To me, programming is all about getting from a problem to a solution via understanding, designing and coding. So programming is more that just the realisation of the solution in code and takes more time to learn. I have been programming for more than 20 years and I am still learning new skills, that is why I do it.

How long to become an expert? Somebody with a great deal of knowledge about, or skill, training, or experience in, a particular field or activity, how long does it take to gain a ‘great deal’? (rhetorical question)
I kinda agree with Hammurabi here, to truly master something you have to invest a lot of time in it. Maybe ten, twenty or maybe just five years but he is kinda right.

However, I don't want to be a super-duper expert. Let me try to say it like this. I want to learn quick enough so that I have the same main goals at the beginning of my C++ learning and at the level where I can actually reach those goals.

I don't know, it's hard to explain.

Rim, the best way is to start a project that is a little (or fine) bit above your current abilities...
But it has a project that will keep you interested


I am trying to find something like that but every more or less interesting I can think of is far above my level. I cannot even program a simple GUI. What kinda projects did you do?

The thing is, it's totally unsatisfactory. I spent way more time learning C++ than I spent on studying for my Maths exam and I got an A- for that one. I had that feeling of success. In C++ I kinda miss that feeling, it always feels like I am soooooo far from my goal...

Last edited on
How long did you say you've been learning? Two weeks?
The problem here seems to be that you're confusing the scales. A math exam will never cover more than two or three very basic subjects. On the other hand, every, say, 100 or so lines of code contains the programming equivalent of a math test. A complete, complex program can be anywhere between 5000 lines and 1M lines long, not counting the libraries it may use. For example, the Linux kernel (by itself, not counting userland code) is 4M lines long; the NT kernel is 40M lines long, IIRC; Firefox 1.5 is 2M lines long.

It's true that you should try something just above your abilities, but that's when you have any abilities at all! If you've just been learning for two weeks, you can't possibly expect to do something much more complex than an inefficient prime calculator.
Keep going, though. It's a long road, but terribly gratifying.
Last edited on
closed account (z05DSL3A)
If I recall correctly Bjarne Stroustrup's programming text book is designed to take something like 15 Hrs a week for six months.

To keep yourself motivated, your projects should be on a subject that you are interested in, or that you know something about and something that you can grow. One of my early projects was a calculator, this started out life as your basic command line 1+1 = ? type of affaire but, as I was into Physics and Electronics at the time, it grow to handle quite complex equations, and eventually moved it into the GUI world and added graphing functionality...
Pages: 12