Connecting...

This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Intermediate C++
For more information, please see full course syllabus of Intermediate C++
Intermediate C++ Object Oriented Programming, Part 1
Lecture Description
In this lesson, our instructor Alvin Sylvain goes through an introduction on object oriented programming. He discusses concepts, terminology, abstraction, encapsulation, inheritance, polymorphism, object relationships, constructors, shallow copy and deep copy.
Bookmark & Share
Embed
Share this knowledge with your friends!
Copy & Paste this embed code into your website’s HTML
Please ensure that your website editor is in text mode when you paste the code.(In Wordpress, the mode button is on the top right corner.)
×
Since this lesson is not free, only the preview will appear on your website.
- - Allow users to view the embedded video in full-size.
Next Lecture
Previous Lecture
0 answers
Post by Eun Gil Cho on June 1, 2019
In the slide of Shallow Copy, the constructor of the Staff class defined in strange way as follow.
( which I've never seen in this class...)
public:
Stuff ( int a , float f) :
anInt( a ), aFloat( f ) { }
Is there a reason why the constructor defined in that specific way?
If so, when should we use that way??
What is different with this following way for constructor??
Stuff ( int a , float f ) {
anInt = a;
aFloat = f; }
1 answer
Tue Nov 4, 2014 10:46 PM
Post by Ram Manohar Oruganti on November 4, 2014
Hi,
In the slide for default constructor, the example contains a user definition of constructor. So, why do we call it the default constructor? It isn't provided by the compiler after all.
Also, I would be glad if you could illustrate the diamond problem with an example. I fail to understand as to what problems it might cause.
Thanks & Regards,
Ram.