Best place to learn C++

Started by
7 comments, last by Alessio1989 8 years, 5 months ago
Hello I am 17 and want to learn c++ and eventually become a game developer what do I need and where should I learn it
Advertisement

My recommendations, read them mostly in order.

# Accelerated C++ by Koenig & Moo

# C++ Primer by Lippman, Lajoie, and Moo, but only if you had trouble with the book above.

# Effective C++, by Meyers

# Effective Modern C++, by Meyers

# Effective STL, by Meyers

# Exceptional C++, by Sutter

# More Exceptional C++, by Sutter

# The C++ Standard Library, by Josuttis,

# The actual C++ standard

I give my reasons for it often enough it became a web page.

I don't doubt frob's recommendations are good, but I think that's too much reading. Pick one book, learn a little and practice a lot. Challenge yourself to write interesting programs and learn the language as you need it. After a few weeks of hacking around, you can go and read some more. Keep alternating practice and reading, but I think the majority of the time should be spent practicing.
Yes, that reading list could easily take over a year. The first one alone should be enough to get you started, the others are there to propel toward mastery of the language.

Working through all of those books -- along with applying the details as you go -- will put you far beyond many who are working in industry.

Programming is an art. You learn it by practicing it, no other way. A good book is great to get you started, and as you become better you can get intermediate and advanced books to refine your skills or develop new ones, but to become a programmer you need to write programs. If you have the money I really suggest taking classes.

I personally find YouTube videos very helpful as I'm a visual learner - there are plenty of playlists on there.

HandmadeHero is quite good, though it's mostly C it is game-oriented unlike a lot of other C++ playlists.

I'm recommending this as an addition to the books listed above - not a replacement!

Honestly, here's what I would do.

1. Learn two languages that are not C/C++. Start with Javascipt, Python, Java, C#, or something more forgiving until you understand the basics. Although I learned on C, I would not recommend it. Make some simple programs and simple games. Make sure you learn and understand object oriented programming: Composition, Inheritance, Abstraction, and Polymorphism.

2. Read this:

Learn C the Hard Way: Practical Exercises on the Computational Subjects You Keep Avoiding (Like C) (Zed Shaw's Hard Way Series)

by Zed A. Shaw

Link: http://amzn.com/0321884922

3. You're done. C++ will just be learning the syntax and figuring out the weird way classes work, and fighting with templates (which I still do, so I'm not sure you ever actually "learn" it)

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532

To be a good C++ programming you need to understand constructors, destructors, inheritance and pointers (as a bare minimum). Once you know how those things work then start coding. Start small and simple like creating text based games. ie build choose your own adventure type games where text is displayed on the screen and you need to make a choice with the keyboard to decide which path to take. Planing and executing on a full game (even a simple one like this) can be a big task and it will teach you how to structure code so that you can reuse parts.

Once you are comfortable working with char's, int's, std::strings start to investigate the other parts of the standard template library. vectors, maps, queues, lists etc. Then try building a 2d text based game like tick-tac-toe or connect 4. This will teach you how to program things that uses arrays.

Now you can start looking at graphics, to improve upon the previous games that you have under your belt.

Do you have any computer organization/architecture knowledge?

"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/

This topic is closed to new replies.

Advertisement