Quantcast
Channel: Comments on: 11.4 — Constructors and initialization of derived classes
Browsing all 159 articles
Browse latest View live

By: gswrg

In this example, class C is derived from class B, which is derived from class C should read In this example, class C is derived from class B, which is derived from class A [ Fixed! Thank you. -Alex ]

View Article



By: ashish aec

This is the exmple of multiple inheritance. in which class a is base class and class b and c is drived class . the base class a is publicly inherit by drive class b and c. should read with 100%...

View Article

By: cammy

I have been getting on well with the tutorials and have learnt a lot. I was just wondering if they cover proper OOP because, as yet, there has been none and with only a few more lessons til the end, I...

View Article

By: baldo

The advantage is only if the base class constructor changes. But if the base class constructor parameters change, then you need to rewrite all of yours derived class constructors…

View Article

By: Taiwan boy

Thanks alot, this article saves me!

View Article


By: TutLover

For Baseball example by default bIsMale Should be bIsMale = true when sending parameters to Person… ;p BTW Love Your Tutorials…

View Article

By: MrAlshahawy

Your tutorial is more than great, Many thanks for this effort, it is really appreciated, Keep up the good work.

View Article

By: sorin

this is a very good tutorial. thanks Alex!

View Article


By: Dhaval

Hi I have problem of calling constructor for base class from derived class. For that I have used above example. But called constructor externally. //a.h #ifndef A_H_ #define A_H_ #include class A {...

View Article


By: floatingDivs

The base class constructor Base(int) will be used to initialize m_nValue to 5, and the derived class constructor will be used to initialize m_dValue to 1.3! Wouldn’t it be that the base class...

View Article

By: Child class constructor? | BlogoSfera

[...] the constructors listed but I don’t know how. (I couldn’t understand the explanations here and here…among other things, they were using some : operator I couldn’t quite [...]

View Article

By: Base class don't have default constructor when derived class constructor...

[...] copyquery No comment yet (adsbygoogle = window.adsbygoogle || []).push({}); I just read Constructors and initialization of derived classes And I met a question. Code as followed. The problem is...

View Article

By: momalok

(from the Derived potion of the object) I never was that good at potions when i was at hogwarts.

View Article


By: ict_ifycent2

MR.ALEX THANKS ALOT FOR THIS YOUR WONDERFUL TUTORIAL…..

View Article

By: LZ

hi can someone help me please. i’ve assignment about to write a simple program that can save staffs’ information. the program must include name, staff id, occupation, salaries, ic number and faculties....

View Article


By: manojg

What is the difference between these defnition of the derived classes constructors: class Base { protected: int a, b; public: Base() {} Base(int aa, int bb) { a = aa; b = bb; } }; class Derived :...

View Article

By: Taiwan boy

Thanks alot, this article saves me!

View Article


By: TutLover

For Baseball example by default bIsMale Should be bIsMale = true when sending parameters to Person… ;p BTW Love Your Tutorials…

View Article

By: Tradon

You can find the answer here. http://www.learncpp.com/cpp-tutorial/810-const-class-objects-and-member-functions/

View Article

By: KETAN MAKWANA

FULL PROGRAM…….. #include<iostream> #include<conio.h> #include<string.h> using namespace std; class rcc { protected :     char name[15];     char address[20];     char dob[10];...

View Article
Browsing all 159 articles
Browse latest View live




Latest Images