Learning C++

Started by
7 comments, last by sgalland 16 years, 11 months ago
First off, I am a complete beginner. I am the manifestation of the new person. Well, that's not completely true. I have done Flash Actionscript 2.0 coding for over a year, but it does not support 3d games, and if it did, chances are they'd be slow and cumbersome. Thus, I have decided to depart of the epic quest of learning C++ coding language. For someone who has no idea what it is, how it works, or anything of that, can anyone suggest or link me to a nice beginner's tutorial? Since I already know Photoshop and 3dsMax, I really just need to master a useful coding language. Thanks in advance, IronWarrior.
Advertisement
Hello there!

I'm just going to tell you that people are going to tell you that C++ is a really hard/complex language, not the best to start with, and they'll be right. However, I too switched to C++ after a couple of years actionscripting. If you can handle actionscript 2.0 with classes, OOP and stuff, the only thing that might cause you some headackes will be pointers and maybe fixed-type variables.

Other than that, I really recommend buying a book to start learning C++, that's how I did and it worked pretty well. Gamedev.net will be an awesome resource if you have trouble learning!

Oh and I've been programming C++ for... 2 years and a half I think. If you're planning to master the language before going on to game creation, expect AT LEAST one year learning. You can also go the other route, trying to build games as your knowledge increases, this might be more fun. Anyhow, prepare yourself to be working on console apps for a couple of months :P.

Good luck!
Back when I was trying to learn C++ (I had never coded in my life) I didn't find any good tutorials on the internet; though that may have changed since then. So instead of going to the internet I recommend the book "C++ Primer Plus Fifth Edition"; that's what I used (in conjunction with classes).

Oh and if you ever finish it and feel up to learning more I recommend "Effective C++: 55 Specific Ways to Improve Your Program and Designs" by Scott Meyers; its got a lot of great tips on writing good C++ code.
If you were to tell me that you've done programming in another language before and understand most of the concepts then I would say go with tutorials. However, if you are a newb to programming then you without question need a book.

The reason is because books tend to give you a better insight on the field vs tutorials. Anyways, I used "Sam's C++ in 24" and loved it, I can't recommend anything else.
If you want to take the plunge, I'd recommend Ivor Horton's Beginning Visual C++. Besides giving a good introduction to c++, it also introduces MFC and C++/Cli (which you can also skip, since chapters are nicely divided). If there are subjects which aren't clear enough, there's always the internet to help you out.
But remember it won't be easy. Maybe you should also consider trying C# for example, which is easier to master, and will also allow to make 3d games and will eventually make the transition to c++ a lot easier.
I've always said, learn the ANSI C++ standard first then go from there! most compilers support the ANSI standard (or atleast should do) so you won't have a problem learning it on different platforms, master the fundamentals FIRST, learn to think in OOP, learn good programming habits, as Trillian says, atleast a good year to really let the basics sink in then go from there.

I recommend Sams teachyourself books, especially the author Jesse Liberty! don't be in a rush either, if you bleed now your reap the rewards later!

btw, consider learning Java as it can teach you good habits that will serve you well when you learn C++, don't be concerned with the 'speed' of the engine it's the structure of the language that your looking at!
Thanks for all the responses guys!
Here's a good tutorial, the final chapter came with a game example, ordinary and simple but very interesting:

http://mssls7.mssl.ucl.ac.uk/sw/help/cpp/cpplist.htm

One good, and excellent book is Thinking in C++, it cames in two volumes and you can find it in many places, just google it. But here is a link:

http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html

Another goood book is Beginning C++ through Game Programming, second edition, from Michael Dawson. Is not free, look at Amazon or at a bookstore.

Good luck.
If I may, I would recommend following the learning path on CProgramming.com http://www.cprogramming.com/books.html

I have had good luck learning C++, you might be able to skip C++ Without Fear and Practical C++ and replace it with C++ Primer 4th Ed, but the rest of the books are great. Personally, I read C++ Without Fear and its a great book, it solved my problems I had with C++ and I even came to the language with some C experience. Also I think the best tutorial on learning C++ is Google, whenever I had a problem with my code I would learn more about how to use a libarary or operator to figure out why I am having the problem in the first place. I have learned more programming from Google than I had any amount of books combined. Also beware of people that want you to program in C#, in my experience (I learned C# for my job), its not really worth it, especially if you are truly serious about being a game programmer. If you want to make demo's and mess with game programmming, then C# is cool but obviously will be slower than C++.

Another suggestion, learn C++ really well before moving to any external libraries or game/graphic API's, when you have a solid foundation in C++ it will make your life sooo much more bareable, and I am sure its true with any language. It may take months, but if you want it, you will get there.

I hope I was able to help and good luck with your endevors!

This topic is closed to new replies.

Advertisement