Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Any suggestions for teaching myself C++?

FrostWyrmFrostWyrm Member Posts: 1,036

I'd like to start learning some C++.

My programming background: I know the basics of BASIC, but thats about it.

I dont have the time or cash to take classes, or else I would go that route for sure.

So could anyone possibly suggest some good literature or (preferably free) online tutorials/learning tools for teaching one's self C++?

For that matter, should I even really be starting with C++? I hear C# is picking up momentum. Would that be a better route?

 

Of course I want to use this knowledge to ultimately make a few small games, or maybe even some Android apps, and maybe move on to bigger things from there. So any advice would be appreciated.

«13

Comments

  • MMOExposedMMOExposed Member RarePosts: 7,387
    I too would like to know what you find. Most c# stuff I found had a fee

    Philosophy of MMO Game Design

  • DisdenaDisdena Member UncommonPosts: 1,093

    Way way back when, I learned Visual Basic and C from a set of books called "Teach Yourself [insert language here] in 21 Days". I googled the title to see if they made one for C++, and the first result is a site where the whole book is posted. Give that a try if you want.

    image
  • Terminus-EstTerminus-Est Member UncommonPosts: 352

    I found http://www.learncpp.com/ quite good for the basics. 

  • OberanMiMOberanMiM Member Posts: 236

    C++ is a large step above BASIC.

     

    Sure for simple "Hello World" programs its not hard but there are techniques like pointers & referencing memory, polymorphic functions, classes etc that will make your head spin unless you ease yourself into them. Then you get into things like MFC (Microsoft Foundation Classes) for windows.

     

    My suggestion is try to learn C first then graduate to C++ afterwards, don't try to jump directly into C++.

  • dreldrel Member Posts: 918

    Originally posted by Terminus-Est

    I found http://www.learncpp.com/ quite good for the basics. 

    I liked the site! Lots of great information

  • NitthNitth Member UncommonPosts: 3,904


    Originally posted by FrostWyrm
    I'd like to start learning some C++.
    My programming background: I know the basics of BASIC, but thats about it.
    I dont have the time or cash to take classes, or else I would go that route for sure.
    So could anyone possibly suggest some good literature or (preferably free) online tutorials/learning tools for teaching one's self C++?
    For that matter, should I even really be starting with C++? I hear C# is picking up momentum. Would that be a better route?
     
    Of course I want to use this knowledge to ultimately make a few small games, or maybe even some Android apps, and maybe move on to bigger things from there. So any advice would be appreciated.

    If your looking for employment your going to need the credentials that come from a higher learning course.

    There are plenty of free online tutorials, and Microsoft even provides tutorials on a vast variety of topics.

    C# is great for somethings, for example you could use c# to develop your phone apps no worries. there have also been AAA games writen in C#. but its still not widely accepted .

    Which ever language you pick up, your not going to learn it over night...its going to take a long time. But the more you do it, the easier it gets and you can adapt skills to learning other languages eventually.

    image
    TSW - AoC - Aion - WOW - EVE - Fallen Earth - Co - Rift - || XNA C# Java Development

  • maskedweaselmaskedweasel Member LegendaryPosts: 12,180

    A great beginners book is "Starting out with C++"

     

    http://www.amazon.com/Starting-Out-Early-Objects-Edition/dp/0136077749/ref=sr_1_1?ie=UTF8&qid=1335187587&sr=8-1

     

    I think this is the newest edition,  but you can easily find earlier editions and it will take you through the basics and the books will be much cheaper, cover most of the basics, and if you can find an earlier edition used one.. you can likely get it for 6 or 7 bucks... if not off of amazon, try barnes and noble.

     

    This is what they used to use when you were taught by an instructor...  they are very informational,  and a good reference..  

     

    Once you learn the basics, its not too hard to jump into a C++ dictionary and start to understand the code quite a bit better.  You'll be able to start pulling pieces out,  and take on more advanced books.  Things like advanced or effective C++  or moving on to games.

     

    ::Edit:: Also,  While android does alow for native C++ it doesn't work quite the same, you'd be better off learning a bit about java, and honestly its not too strikingly different if you'e getting into android programming.   <== android developer ==>   you can get the hang of it,  but the structure and controls are going to take you a bit to get used to, even if you're "fluent" in C++.  

     

    Once you learn a language pretty well though,  moving to other types of programming isn't so tough.

     

     

    Also as far as getting a job in the gaming industry,  you don't need any crazy degrees... what you need is a strong portfolio more than the degree.... if you can show you can program and you can show your work, thats more than enough to get your foot in the door.    The road will not be easy either way, even if you have formal training,  but you'll make it if you stay focused.



  • CuathonCuathon Member Posts: 2,211

    http://www.cplusplus.com/

    I used that site for its excellent documentation of C++ when I was learning it. It also has a forum. You can also google pretty much anything in C++ and there are also libraries for many many things.

    You will probably have to learn openGL on top of C++ for graphics, or alternatively directX but, I prefer to use non commercial products with more open licenses.

    really good libraries for C++ include www.boost.org. Boost libraries are often added into the C++ standard.

    common libraries with the GPL license or something similar include things like libxml2, freetype6, and so forth.

    the most common openGL libraries are opengl32, glu, glut. there are also several superior windowing toolkits over glut, although for a simple 2d game glut is probably fine. it has mouse inputs and keyboard inputs and such as well as window functions.

    some people prefer to use more modern solutions even for simple games like, SDL, SFML and so forth.

    since you want to do games there are several gui libraries you can use like glgooey, cegui, glui, and glow. some haven't had actual development since 2006 or so however.

    you can also use widget stuff like wxwidgets, gtk+, and QT for simple interfaces.

    c++ is primarily used for very large games, if you want to do smaller 2d games and such you may find it easier to use a higher level language. Java appears to be the primary language for android apps. or maybe scripting like python.

  • DragonantisDragonantis Member UncommonPosts: 974

    C++ is imo the most important language of them all, its taught to everyone who works with computer hardware or software. Learning it allows you to pick up the other advanced languages more easily.

    Its easy to learn yourself, use this program to write and test programs without messing around in CMD, I used this in college, its pretty good.

    http://www.bloodshed.net/devcpp.html

    As for where to learn I dont have any recommendations for that :(

  • NitthNitth Member UncommonPosts: 3,904


    Java appears to be the primary language for android apps. or maybe scripting like python.

    In this day and age you can get IDE's that trans code to any platforms native code.

    Ie C# > Objective C

    image
    TSW - AoC - Aion - WOW - EVE - Fallen Earth - Co - Rift - || XNA C# Java Development

  • CuathonCuathon Member Posts: 2,211

    Originally posted by Dragonantis

    C++ is imo the most important language of them all, its taught to everyone who works with computer hardware or software. Learning it allows you to pick up the other advanced languages more easily.

    Its easy to learn yourself, use this program to write and test programs without messing around in CMD, I used this in college, its pretty good.

    http://www.bloodshed.net/devcpp.html

    As for where to learn I dont have any recommendations for that :(

    No, no, no, no, no, no!!!!!

    Do not recommend that new programmers use that crappy outdated IDE.

    Get Code::Blocks or just go for Visual C++.

    i don't like microsoft but the reason to use vc++ is that there is just so much library support and most things that you want to do are supported there.

    code::blocks is far superior to bloodshed in every way also, but still not as supported as microsoft compilers.

  • maskedweaselmaskedweasel Member LegendaryPosts: 12,180

    Originally posted by Cuathon

    http://www.cplusplus.com/

    I used that site for its excellent documentation of C++ when I was learning it. It also has a forum. You can also google pretty much anything in C++ and there are also libraries for many many things.

    You will probably have to learn openGL on top of C++ for graphics, or alternatively directX but, I prefer to use non commercial products with more open licenses.

    really good libraries for C++ include www.boost.org. Boost libraries are often added into the C++ standard.

    common libraries with the GPL license or something similar include things like libxml2, freetype6, and so forth.

    the most common openGL libraries are opengl32, glu, glut. there are also several superior windowing toolkits over glut, although for a simple 2d game glut is probably fine. it has mouse inputs and keyboard inputs and such as well as window functions.

    some people prefer to use more modern solutions even for simple games like, SDL, SFML and so forth.

    since you want to do games there are several gui libraries you can use like glgooey, cegui, glui, and glow. some haven't had actual development since 2006 or so however.

    you can also use widget stuff like wxwidgets, gtk+, and QT for simple interfaces.

    c++ is primarily used for very large games, if you want to do smaller 2d games and such you may find it easier to use a higher level language. Java appears to be the primary language for android apps. or maybe scripting like python.

     

    I think most books, and most online tutorials start teaching in OpenGL,  though DirectX seems like it may be a little easier to learn.

     

    I think we're getting very far ahead of ourselves though... in honesty he could likely pull an engine like Unreal or Unity and use it for free to create something without learning a tremendous amount of programming.



  • CuathonCuathon Member Posts: 2,211

    Originally posted by Mellkor

     




    Java appears to be the primary language for android apps. or maybe scripting like python.


     

    In this day and age you can get IDE's that trans code to any platforms native code.

    Ie C# > Objective C

    That is true. However I am pretty sure most people use Java and for a new programmer it would be so much easier to use the most supported language instead.

  • BartDaCatBartDaCat Member UncommonPosts: 813

    Great thread, and great feedback, thanks to the OP for posting it, and thanks to everyone else for the input, this helped me, too!

  • GhabboGhabbo Member UncommonPosts: 263

    You can, of course, try to learn any OOP lenguage, but if you have little experince and you're coming from Basic, I strongly recommend you start by learning C. That way you'll get used to the syntax and more complex stuff like pointers and memory allocation.

  • CuathonCuathon Member Posts: 2,211

    Originally posted by maskedweasel

    Originally posted by Cuathon

    http://www.cplusplus.com/

    I used that site for its excellent documentation of C++ when I was learning it. It also has a forum. You can also google pretty much anything in C++ and there are also libraries for many many things.

    You will probably have to learn openGL on top of C++ for graphics, or alternatively directX but, I prefer to use non commercial products with more open licenses.

    really good libraries for C++ include www.boost.org. Boost libraries are often added into the C++ standard.

    common libraries with the GPL license or something similar include things like libxml2, freetype6, and so forth.

    the most common openGL libraries are opengl32, glu, glut. there are also several superior windowing toolkits over glut, although for a simple 2d game glut is probably fine. it has mouse inputs and keyboard inputs and such as well as window functions.

    some people prefer to use more modern solutions even for simple games like, SDL, SFML and so forth.

    since you want to do games there are several gui libraries you can use like glgooey, cegui, glui, and glow. some haven't had actual development since 2006 or so however.

    you can also use widget stuff like wxwidgets, gtk+, and QT for simple interfaces.

    c++ is primarily used for very large games, if you want to do smaller 2d games and such you may find it easier to use a higher level language. Java appears to be the primary language for android apps. or maybe scripting like python.

     

    I think most books, and most online tutorials start teaching in OpenGL,  though DirectX seems like it may be a little easier to learn.

     

    I think we're getting very far ahead of ourselves though... in honesty he could likely pull an engine like Unreal or Unity and use it for free to create something without learning a tremendous amount of programming.



    He could. But he asked to learn C++. Unity and Unreal are pretty advanced anyways since he didn't say anything about 3d graphics. If he were going to use an engine it might be better to pick one purely targetted at 2d games. Although really 2d games in C++ are not too difficult.

  • maskedweaselmaskedweasel Member LegendaryPosts: 12,180

    Originally posted by Cuathon

    Originally posted by Mellkor

     




    Java appears to be the primary language for android apps. or maybe scripting like python.


     

    In this day and age you can get IDE's that trans code to any platforms native code.

    Ie C# > Objective C

    That is true. However I am pretty sure most people use Java and for a new programmer it would be so much easier to use the most supported language instead.

    QFT

    If he's planning to use an IDE for android, eclipse would be the way to go, and it would be best to program in Java..  not to mention he'll need a dash of XML for some structure work.



  • MMOExposedMMOExposed Member RarePosts: 7,387
    I hate the compiler for Java through ori.
    Also cheap on the Visual Studios. Anybody know a cheap way to get a nice compiler?

    Philosophy of MMO Game Design

  • MMOExposedMMOExposed Member RarePosts: 7,387
    Originally posted by maskedweasel


    Originally posted by Cuathon


    Originally posted by Mellkor


     


    Java appears to be the primary language for android apps. or maybe scripting like python.

     

    In this day and age you can get IDE's that trans code to any platforms native code.

    Ie C# > Objective C

    That is true. However I am pretty sure most people use Java and for a new programmer it would be so much easier to use the most supported language instead.

    QFT

    If he's planning to use an IDE for android, eclipse would be the way to go, and it would be best to program in Java..  not to mention he'll need a dash of XML for some structure work.

     

    Yeah but can you make a serious MMO game with java. Most of those games seem to be C++ ports from IoS

    Philosophy of MMO Game Design

  • maskedweaselmaskedweasel Member LegendaryPosts: 12,180

    Originally posted by MMOExposed

    I hate the compiler for Java through ori. Also cheap on the Visual Studios. Anybody know a cheap way to get a nice compiler?

    Eclipse is free and the one I use.

     

    http://www.eclipse.org/downloads/moreinfo/java.php

     

    They also have libraries for android available which will sync with your virtual machines for testing.  A must have for any android developer.



  • CuathonCuathon Member Posts: 2,211

    Originally posted by Ghabbo

    You can, of course, try to learn any OOP lenguage, but if you have little experince and you're coming from Basic, I strongly recommend you start by learning C. That way you'll get used to the syntax and more complex stuff like pointers and memory allocation.

    that would be a disaster. c doesn't have common c++ functions like std::vector. coding in C for advanced stuff is so different from c++ that it would only confuse you. If you were taking a CS degree you might be able to argue that learning C first is a good idea, but for self teaching he would learn a lot of stuff in C that isn't really important.

    c++ is easy to learn, is well documented, has large library support and many many step by step tutorials.

  • maskedweaselmaskedweasel Member LegendaryPosts: 12,180

    Originally posted by MMOExposed

    Originally posted by maskedweasel

    Originally posted by Cuathon


    Originally posted by Mellkor

     




    Java appears to be the primary language for android apps. or maybe scripting like python.


     

    In this day and age you can get IDE's that trans code to any platforms native code.

    Ie C# > Objective C

    That is true. However I am pretty sure most people use Java and for a new programmer it would be so much easier to use the most supported language instead.

    QFT

    If he's planning to use an IDE for android, eclipse would be the way to go, and it would be best to program in Java..  not to mention he'll need a dash of XML for some structure work.

     

    Yeah but can you make a serious MMO game with java. Most of those games seem to be C++ ports from IoS

     

    Not sure what you mean by "serious"  but yet, technically you can make anything you want to with Java... the best thing about Java is how universal it is.. you could easily create a game for a java platform that could play on any system available...  it all depends on how complex you want to get, and honestly if you're trying to make a very large 3D game like the games you play on the PC,  you'd start using an engine, as coding from scratch will be way too time intensive.

     

    Thats one of the best things about Unity is the portability to all formats, and they have a lot of indie support... but this isn't a thread about game engines, its a thread about learning c++ as cuathon reminded me.



  • GhabboGhabbo Member UncommonPosts: 263

    Originally posted by maskedweasel

    Originally posted by MMOExposed


    ....

     

    Yeah but can you make a serious MMO game with java. Most of those games seem to be C++ ports from IoS

     

    Not sure what you mean by "serious"  but yet, technically you can make anything you want to with Java... the best thing about Java is how universal it is.. you could easily create a game for a java platform that could play on any system available...  it all depends on how complex you want to get, and honestly if you're trying to make a very large 3D game like the games you play on the PC,  you'd start using an engine, as coding from scratch will be way too time intensive.

     

    Thats one of the best things about Unity is the portability to all formats, and they have a lot of indie support... but this isn't a thread about game engines, its a thread about learning c++ as cuathon reminded me.

     

    Wurm Online is java based... extremely complex but not graphic intensive.

  • maskedweaselmaskedweasel Member LegendaryPosts: 12,180

    Originally posted by Ghabbo

    Originally posted by maskedweasel


    Originally posted by MMOExposed


    ....

     

    Yeah but can you make a serious MMO game with java. Most of those games seem to be C++ ports from IoS

     

    Not sure what you mean by "serious"  but yet, technically you can make anything you want to with Java... the best thing about Java is how universal it is.. you could easily create a game for a java platform that could play on any system available...  it all depends on how complex you want to get, and honestly if you're trying to make a very large 3D game like the games you play on the PC,  you'd start using an engine, as coding from scratch will be way too time intensive.

     

    Thats one of the best things about Unity is the portability to all formats, and they have a lot of indie support... but this isn't a thread about game engines, its a thread about learning c++ as cuathon reminded me.

     

    Wurm Online is java based... extremely complex but not graphic intensive.

    I believe Runescape is Java based too...  



  • BrenelaelBrenelael Member UncommonPosts: 3,821

    Here are some more good resources for you to check out:

    http://www.cplusplus.com/

    http://en.cppreference.com/w/

    http://www.cprogramming.com/

    http://www.intap.net/~drw/cpp/

     

    Hope this helps. image

     

    Bren

     

    while(horse==dead)
    {
    beat();
    }

Sign In or Register to comment.