I'm a Java programmer who's currently thinking about learning C++ to write games. Since I'm coming from Java, I'm looking for C++ learning sources and libraries geared towards object oriented programming. Any suggestions?
I'm a Java programmer who's currently thinking about learning C++ to write games. Since I'm coming from Java, I'm looking for C++ learning sources and libraries geared towards object oriented programming. Any suggestions?
umm you could get a book. SOrry I never programed a c++ game yet. But I think a book might help.
Make sure you read abotu the book before you buy one.
Java has a extremely rich APi, unlike C++ (my opinion)...
In C++ you have twice as much features as Java, like templates, virtual and multiple inheritance, implicit/explicit pointers...you name it. Good luck
>In C++ you have twice as much features as Java, like templates,
Java has templates as well (as of 1.5)
>virtual
All methods in Java are virtual
>multiple inheritance,
Java has interfaces to instead, a cleaner and less abused method IMO
>implicit/explicit pointers...you name it.
This is true, from time to time i wish i had an explicit pointer in Java. Though it is never *neccesary*, its sometimes nice to have it for conceptual reasons. (a result of C programming habbits)
Yeah, see here's the thing... when I need to do something in Java, I just go to the sun's API and look for a class. With C++ I have no idea what to do. I don't even know how to get the documentation for C++ standard.
Not virtual methods... virtual inheritance....Originally Posted by Perspective
You're correct, but Java 'templates' is quite different from the C++ version.Originally Posted by Perspective
For example contests like the one running now here at cprog would be impossible to have in Java.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
You should probably get a good beginning book. My beginning book was Teach Yourself C++ in 21 Days, by Jesse Liberty. I liked it because it is easy to understand and is well structured for self-study with questions/exercises at the end of each chapter (day), with answers/solutions in the back... But, I always include a warning: Some people hate all of the "21 Days" books!I have no idea what to do. I don't even know how to get the documentation for C++ standard.
Another often recommended book (which I don't own) is Accelerated C++, By Koenig & Moo. I've never read anything negative about this book.
You can get the ANSI/ISO language standard from ANSI for about $20. In places, the C++ standard refers-back to the C standard... Another $20.
The best (most complete) reference I've found is Dinkumware.com. It's free online, or you can download the HTML file for about $20.
Another good reference is cppreference.com. This appears to be complete also.
I assume that you want to include GUI & Graphics. The bad news is, that none of this stuff is standard C++. It's all compiler/platform/library dependent. In C++, this is intermediate to advanced shtuff, and won't be included in (most) beginning books.