How did you learn C++?

Started by
31 comments, last by assainator 10 years, 2 months ago

I started with learning C++. I used BASIC for two years while in 7th and 8th grades and in my freshman year of high school I bought C++ for DUMMIES and started learning it (DJGPP/Rhide). Been programming in C++ for nearly 20 years now and to this day I still consider myself a beginner because I know there is always something new to learn. Since learning C++, I have dabbled with learning a multitude of other languages, but have gone back to learning C++ (C++ Primer 5th Ed) to make sure I haven't missed anything that may have changed as I didn't proactively stay up-to-date as I should have in those 20 years.

Advertisement

Coming from Pascal/Delphi/ASM I was terrified of C++ in the first place, for many reasons. Then the Quake2 source was released, so I stayed up all night and roamed the city on sunday morning to get a copy of VC6. Compiling and editing my favorite game was an almost orgastic experience at the time. But I bit the bullet and became reasonably proficient with C++ over the years. Never looked back to Delphi (which was on a dead end anyway, but still is one of the greatest IDE's of all time).

I was initially studying Business IT at a university, but shortly in the second year, I decided this wasn't something I wanted to do and decided to stop and do something I like. I was already having a focus on game development and took some programming courses at this university (which was in Java) to fill up the year instead of doing nothing. During the first half year, I also started to learn myself C++ through a book: "Beginning game programming through C++".

I started to learn it myself for 2 reasons: The second half year I could enroll myself in a course that would revolve around programming an engine in C++ and the second reason was that I enrolled myself for a game development course at another university which required me to do an intake assignment in your favorite language. As I already knew the main programming language at that course would be C++, I figured I might as well start using that.

When I did that engine course, I didn't know a lot of C++. I did do some programming in Java, some basic C, VB.net and some of the C++ stuff from that book, but I felt like I was thrown into an ocean and could barely keep my head above water! Luckely it was a team assignment and my team members prevented me from drowning. It was certainly a big learning experience, but I wouldn't say the best one for me.

When I got accepted at the game development university I had a similar experience, except that I started at an empty ocean that was slowly filling up and I had a better chance of getting up to speed.

I don't think there is a best way of learning C++, or any other language for that matter. What seems to work for another doesn't always work for you. Some learn by being thrown into something, some learn by book, some by something in the middle, but the one thing that all these things have in common is simply to do it.

In other words: The how differs per person, as long as you do it.

I learned C programming at Electronics school for microprocessors and microcontrollers, and at the time was writing computer games in DarkBASIC. I later felt the need to move to a more powerful language, and read a few books on C++ conventions. One such book which I feel defined my fundamental understanding of C++ was Moving from C to C++ by Greg Perry.

I write a lot of C++ code nowadays for small personal projects, and think that's really one of the only ways to gain a complete understanding of the language. Books help you a lot, but they won't get you anywhere if you don't practice.

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty
Much like a lot of other answers here, I learned c++ for university projects (statistical physics).

I think it's important to work on projects that interest you, to help you stay motivated, so try to think of a small project that will give you a buzz.

Also, remember that different people will solve a problem in different ways, and c++ is a multi-paradigm language. There's no substitute for doing your own coding, but it can also be an eye-opener to read someone else's code (assuming you trust their abilities of course.)

Most of all, have fun with it, and don't be scared to try and fail. Nobody has to see your early coding horrors! And nobody here will judge you badly for making mistakes. Good luck!

Visit http://www.mugsgames.com

Stroids, a retro style mini-game for Windows PC. http://barryskellern.itch.io/stroids

Mugs Games on Twitter: [twitter]MugsGames[/twitter] and Facebook: www.facebook.com/mugsgames

Me on Twitter [twitter]BarrySkellern[/twitter]

While I used C++ for a few classes, I had no clue what I was doing until I worked in a team environment with others. Once I saw actual code doing useful things written by real coders, every line of code and every statement used all of the sudden had a clear rationale, and the whole language quickly made sense. Ever since then, I always learn new languages by just throwing myself into a code base. It works incredibly well for me, and I love being able to just change a line of code to see what happens.

I went through a lot of tutorials like Learncpp.com and I thought I learned a lot. But I didn't really understand it until I started doing projectEuler puzzles.

Yeah, never learn the lang alone. But learn it to do something! But as a pro programmer. I still think that searching skill is the most necessary thing. Sometime u dont need to know the lang to do the job. Just know what you want to do, and most the time, someone on the net did it already, or some part of it. Search it, download, build it, then tweak to see what it do (Instead of read the code, understand every line, then write your own! ). Because the code already running, so change something to see how it work is very easy to understand . That's the fastest way for me. Although if you write it your own u can understand it better, unless you are a student and have a lot of time to spend!

I learned c++ basics from www.cppgameprogramming.com. After I read all the tutorials there, I switched over to this site and I must say, it wasn't a mistake! I almost wish I started here!

I develop to expand the universe. "Live long and code strong!" - Delta_Echo (dream.in.code)

The first time I saw C++ was at uni in two different and inadeguate courses, the first was more a C with some C++ elements (references, new, delete, and bad basic usage of iostream) and it didn't teach quite nothing (it was also bad explained too, without a comprehensive explanation of memory model, allocation, and everything else, so it wasn't a good course to lern C too..)... The second course was just a java introduction course explaining "C with classes"...

So I really stared learning the basics of C++ with the Bruce Eckel's books giving me decent basis for C++98/03 (you can find them as free electronic versions). The rest I learnt (and I'm still learning) comes from websites... I'm actually evaluating the purchase of last Bjarne Stroustrup's book that covers C++11...

"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