The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Learning C++?

OverlordOverlord Registered User regular
edited June 2008 in Help / Advice Forum
I'm looking into learning some C++, I have a compiler and everything, and have done some basic scripts (Hello World, Math Equations, etc.) But I was wondering if anyone knows where I could find a good resource on learning C++? Online tutorials and the such, or recommend a good book on the subject.

sigsh.gif
Overlord on

Posts

  • VThornheartVThornheart Registered User regular
    edited June 2008
    From all I've read, the "C++ Primer Plus" (Published by Sam's Publishing) is probably one of the most useful single volumes on the subject.

    Most Bookstores should have it, or you can swing by Amazon.

    VThornheart on
    3DS Friend Code: 1950-8938-9095
  • LewishamLewisham Registered User regular
    edited June 2008
    I like the Deitel and Deitel C++ book.

    Lewisham on
  • .kbf?.kbf? Registered User regular
    edited June 2008
    http://www.cplusplus.com/doc/tutorial/

    Also the C++ for dummies book is pretty good at explaining things in a way someone with no experience in the field can understand.

    .kbf? on
  • theSquidtheSquid Sydney, AustraliaRegistered User regular
    edited June 2008
    Do not fucking ever buy a SAMS book. You don't really need a C++ for Dummies book either. The problem with SAMS books is as a general rule while they provide instructions on correct syntax, they're terrible at explaining the strengths of the language, why you use the features that it has, and good programming style. Follow the SAMS way of doing things and you'll be making inefficient garbage programs.

    Firstly, how much programming experience do you have in general? If the answer is none, get C++ Primer Fourth Edition by Addison Wesley. If the answer is some, get The C++ Programming Language by Stroustrup.

    It is a golden rule that if you want to learn a programming language (and I mean properly learn it) get the book written by the author of the actual language. Stroustrup created C++, therefore you should get the book written by him. Perl was written by Larry Wall, therefore if you want to learn Perl you get Programming Perl by that author.

    That rule has the caveat that you generally should know general programming syntax before you follow that principle, which is why I recommended C++ Primer instead.

    theSquid on
  • OremLKOremLK Registered User regular
    edited June 2008
    There are so, so many books out there for C++. The one I learned off of, which I recommend, is C++ Without Fear by Brian Overland.

    Thing about C++ though--it's pretty hard to become good at it, because it has so much minutia. It's much easier to learn object-oriented programming through C#, Java, or some other language, so that you get really strong with the concepts before having to learn the many, many tedious details involved in C++.

    OremLK on
    My zombie survival life simulator They Don't Sleep is out now on Steam if you want to check it out.
  • theSquidtheSquid Sydney, AustraliaRegistered User regular
    edited June 2008
    Depends how far you want to get into C++. It's perfectly okay to get as far as OO, and then drift off elsewhere before returning later. It is pretty much the most hardcore langauge out there at the end of the day though, and there's always more to learn about it.

    theSquid on
  • wabbitehwabbiteh Registered User regular
    edited June 2008
    I'd like to second theSquid's recommendations, though I'm not as harsh on the SAMS book. The C++ Programming Language really is geared towards people who know a bit about programming, or who have already read a C++ book. As a first book, I would definitely not recommend it - the layout is not geared toward learning the language from scratch. Coming back to it later as a more advanced read may be a good idea. Also, note that C++ Primer and C++ Primer Plus are different books, from different authors, from different publishers. The only similarity is the title. Additionally, the Amazon.com page for C++ Primer appears to still use reviews from the older, not-as-well-received editions of the book.

    I have also heard good things about Accelerated C++ (Addison-Wesley), which is more of a "learn-by-example" or "how you should do <programming task> in C++" book. Less about the legality and syntax of the language, more about programming style.

    Disclaimer: I do not have a massive realm of C++ experience, nor have I read a tremendous number of books, so take what I say with a grain of salt. I may be completely oblivious to the definitive greatest C++ book that everyone is talking about.

    wabbiteh on
  • VThornheartVThornheart Registered User regular
    edited June 2008
    Generally I agree about the Sams thing, but C++ Primer Plus (unlike most Sams books) has gotten some rave reviews. I suppose that could just mean that a lot of people out there don't know a good book... but if it helps, I recently acquired it and it's relatively helpful. Moreso than pretty much any other C++ book I've ever gotten... which admittedly isn't saying much (I've bought some crappy books in younger days when I first started trying to learn C++), but it is better than, say, The Complete C++ Reference by McGraw Hill. (In my opinion, let it be noted).

    VThornheart on
    3DS Friend Code: 1950-8938-9095
  • JNighthawkJNighthawk Registered User regular
    edited June 2008
    I highly recommend C++ for Dummies. It was the first C++ book I picked up and it did me well. One downside is that you'll have to separate what's part of the C++ language and CRT and such, and what's provided by the compiler they recommend (DJGPP, I believe).

    But, as others have said, to better recommend stuff, we'd need to know why you want to learn it and what your previous programming experience is.

    JNighthawk on
    Game programmer
  • OverlordOverlord Registered User regular
    edited June 2008
    The only programming experience I really have is QBasic from back in the day. The main reason I'm trying to learn it is that right now I do 3d graphics and such, and if I was recommended to learn some programming for if I ever apply at a game company, since they supposebly prefer people with an understanding in both areas. I'd also like to learn it for use in modding games that use it as the programming language.

    Overlord on
    sigsh.gif
  • theSquidtheSquid Sydney, AustraliaRegistered User regular
    edited June 2008
    So you understand program structure, functions etc? Good. Stroustrup.

    And preferably a year of computing at a decent university along with some first year math. When game companies code, they don't mess around.

    theSquid on
  • JNighthawkJNighthawk Registered User regular
    edited June 2008
    If you're applying in a strictly art position, you don't need to know the exacts of the code - just a general understanding of the ideas is helpful. I'm not sure if I'd recommend Mr. Bjarne's book in this case - I don't think you need to go in depth. A wide, but shallow understanding should work.

    JNighthawk on
    Game programmer
  • ScrubletScrublet Registered User regular
    edited June 2008
    http://www.cppreference.com/index.html is a good reference for a lot of general things you may need to look up while you work.

    Scrublet on
    subedii wrote: »
    I hear PC gaming is huge off the coast of Somalia right now.

    PSN: TheScrublet
Sign In or Register to comment.