-
April 16th, 2014, 12:53 AM
#1
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
-
April 16th, 2014, 12:59 AM
#2
Re: Learner in C++
I recommend working through Accelerated C++.
-
April 16th, 2014, 03:01 AM
#3
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..
-
April 16th, 2014, 04:45 AM
#4
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)
-
April 16th, 2014, 11:25 AM
#5
Re: Learner in C++
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|