Jump to content
  • Advertisement
Sign in to follow this  
game of thought

Moving onto c++ from c

This topic is 1962 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, i have learned c for maybe three months and made some games and apps with the language and i am looking onto learning c++. I have read c++ tutorials in the past and they seem very similar to c to begin with, as i have a book on it. What i wish to know is what should i start with regard to c++ bearing in mind i know the basics of c and have a bit of experience with it.

Thanks

Share this post


Link to post
Share on other sites
Advertisement
Guest Hiwas

I would look at this piecemeal in stages.  Simple concepts such as knowing when to use pointers instead of references, replacing lists and arrays with STL variations when it makes sense etc.  I would move on to simple concepts of putting functions into structures and getting used to the idea of the implied "this" pointer existing.  From there, you can start into classes and virtual functions and all that fun stuff.  Basically, I am suggesting you take it slow and only incorporate small replacement bits as you go which clean up your C code using C++ abilities but don't jump in head first till you have built on your basic understanding.

Share this post


Link to post
Share on other sites

Get a good book on C++.  You know some C, which means you will be able to progress pretty quickly through it, but then again you've only been doing C for 3 months... which is really not much at all.

Share this post


Link to post
Share on other sites
I have to say that even though people often cite C++ as just "C with classes" the fact is that C++ pretty much redefines most of the coding style, libraries and idioms that pure C coders "grew up with." I would definitely think about investing in a good C++ book or a lot of research.

You probably will pick the language up a lot easier given that you have a C background but there are quite a few differences to learn, OOP by itself could cover many books(and does!)

Share this post


Link to post
Share on other sites

http://www.learncpp.com/

...I think this is the best to start with.

Once you went through the tutorials find yourself a project that is relatively small(1-2 weeks) and start working on it in C++. ...or rewrite one of your older games in C++.

I dont recommend a book if you already know the basics. Especially not something like Stroustrup`s book.

 

C is a subset of C++ so (almost)all the C-stuff will work.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!