1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[C++] Example program source with many comments needed

Discussion in 'C, C++, C#' started by Lehsyrus, Dec 16, 2012.

  1. Lehsyrus

    Lehsyrus Newbie

    Joined:
    Nov 4, 2012
    Messages:
    19
    Likes Received:
    3
    Hello everyone. I am in the process of teaching myself C++, and I am so far on track with no issues. The only thing is, I want to speed up the learning process and I am a very visual an descriptive person. I was wondering if anyone had a basic programs source code and could comment on basically the entire thing in snippets so I can actually see how it works in full, rather than being taught one little snippet in a 9 minute tutorial?

    I have the basic understandings of method and function structuring, as well as basic loops and also classes. I can make your run of the mill calculator in a console window (I'm not at GUI's yet), but I feel like I could learn much quicker with a hands on example. Thanks guys!
     
  2. Blackberry_11

    Blackberry_11 Regular Member

    Joined:
    Apr 17, 2011
    Messages:
    266
    Likes Received:
    19
    comment is not so necessary ,
    actually it is important for the next developer ,who come after you.
     
  3. shedboy

    shedboy Newbie

    Joined:
    Jan 11, 2009
    Messages:
    47
    Likes Received:
    61
    I would recommend you look at the appropriate section on planetsourcecode or equivalent site, you can learn plenty from the examples on there.

    Some are better than others.

    If you wanted to go further look at open source C++ projects on sourceforge where the code should be freely available
     
  4. lietuvis002

    lietuvis002 BANNED BANNED

    Joined:
    Aug 3, 2012
    Messages:
    2,415
    Likes Received:
    2,576
    Comments are important in programming to help orientate where are you and what you programming. http://www.dreamincode.com, here you can find lots of examples.. Gl
     
  5. ikstob

    ikstob Junior Member

    Joined:
    Nov 12, 2012
    Messages:
    147
    Likes Received:
    129
    Location:
    ikstob.com
    Home Page:
    I'm a C++ developer by trade, and even I wouldn't recommend the language as a starting place but congrats on your first steps!

    As much as it pains me to say it, C++ is not great for the "quick & painless development of simple tools". My case in point is around GUI's, if you want to write a GUI for your application you have two choices:

    1) MFC/ATL - Windows only, and not exactly easy to work with .. >90% of your code/time will be consumed managing the GUI
    or,
    2) Cross-platform Toolkits like wxWindows, Qt etc. or you've got the platform specific ones like Cocoa (OS X) .. either way you'll put yourself through a world of pain to achieve the simplest things.

    Alas, all is not lost... If you are already on Windows, save yourself a world of pain and switch to .NET, more specifically C# .. syntactically it is remarkably similar to C++ but you get the ease of Windows Forms based UI's and an order-of-magnitude more examples, libraries and comrades actively developing in it.

    I wish you the best of luck and I'm happy to answer any questions you might have, I live between Linux, OS X and Windows and have experience writing software for all three platforms :eek:) joy!!
     
  6. new2world

    new2world Registered Member

    Joined:
    Jan 16, 2013
    Messages:
    61
    Likes Received:
    8
    There are two main things that counts in programming and what I have seen in jobs requirement. One is Logic like how to use formulae to make it work and other is GUI. Basic is very easy but getting in deep is real task.
     
  7. seoways

    seoways Jr. VIP Jr. VIP Premium Member UnGagged Attendee

    Joined:
    Dec 19, 2009
    Messages:
    4,656
    Likes Received:
    724
    Location:
    Behind you!
    Start coding by yourself and face the errors. Indeed, correcting the errors can lead you to become a great programmer
    Thank You!!