From J to C

This is a discussion on From J to C within the C++ Programming forums, part of the General Programming Boards category; I'm a Java programmer who's currently thinking about learning C++ to write games. Since I'm coming from Java, I'm looking ...

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    2

    From J to C

    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?

  2. #2
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    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.

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    722
    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

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    >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)


  5. #5
    Registered User
    Join Date
    Sep 2004
    Posts
    2
    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.

  6. #6
    Registered User
    Join Date
    Jun 2004
    Posts
    722
    Quote Originally Posted by Perspective
    >virtual
    All methods in Java are virtual
    Not virtual methods... virtual inheritance....

  7. #7
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Quote Originally Posted by Perspective
    >In C++ you have twice as much features as Java, like templates,
    Java has templates as well (as of 1.5)
    You're correct, but Java 'templates' is quite different from the C++ version.
    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

  8. #8
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Lightbulb Books, Standards & References

    I have no idea what to do. I don't even know how to get the documentation for C++ standard.
    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!

    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.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21