CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Learner in C++

  1. #1
    Join Date
    Apr 2014
    Posts
    17

    Learner in C++

    Hi,

    I'm beginning to learn C++ (I have a good experience of several years in procedure oriented programming languages like Fortran , C ).

    Can anyone direct me to some good sample code (simple one) which demonstrates object oriented feratures like classes,objects, inheritance and polymorphism?

    Thanks
    Atee

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Learner in C++

    I recommend working through Accelerated C++.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    Apr 2014
    Posts
    17

    Re: Learner in C++

    Thanks a lot.
    I went through the hyperlink for Accelerated C++.

    Did you use the sampel source code? How useful did you find it..just confirming before placing the order online..

  4. #4
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,824

    Re: Learner in C++

    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  5. #5
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Learner in C++

    Quote Originally Posted by atee
    I went through the hyperlink for Accelerated C++.

    Did you use the sampel source code? How useful did you find it..just confirming before placing the order online..
    Accelerated C++ follows the pedagogical recommendation outlined by Stroustrup in his essay on Learning Standard C++ as a New Language (PDF). This generally means an approach that favours the usage of higher level abstractions such as the standard library facilities early on, rather than first going through the nitty-gritty of the C part of C++ only. Since you already have a background in C, this should especially work out to your advantage.

    It does not go straight into "object oriented feratures like classes,objects, inheritance and polymorphism" (the book only starts going deep into this in chapter 9), but because it introduces standard library facilities early on, working through it chapter by chapter should give you a sense of how such features are commonly applied (or not applied, as the case may be) in C++, which is a Good Thing since you will be more likely to write idiomatic C++ and less tempted to use C++ as if it were another programming language with a different syntax.

    There is a drawback in that the book was written in 2000 and to my knowledge has not been updated to reflect the 2011 version of the C++ standard, but that should not be a problem as you can always get up to speed after acquiring what is fundamental.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured