@@sajidqureshi9954 can u please clarify because calling something from base class within derived is something we call inheritance . In case of member function also though it's inherited but to make it work we have to call member function within derived class
@@adarshjaiswal7334 Constructors are different from other class methods in that they create new objects, whereas other methods are invoked by existing objects.This is one reason that constructor aren’t inherited. Inheritance means a derived object can use a base-class method, but, in the case of constructors, the object doesn’t exist until after the constructor has done its work.
@@sajidqureshi9954 can u please explain with reference to the example in video as u told to invoke constructor we use new object and for other method we use existing object but I am confused as bcz there is only one object that is marks so what actually u want to say may u please example with example
In multilevel inheritance , which constructor will call first ? Suppose, Class A { A(){ } } Class B:public A { B(){ } } Class C:public B { C(){ } } Here i need to confirm that the first constructor will called is A() then after B() then after C() Is this order of constructor execution in multilevel inheritance is true ?
Sir ur absolutely confusing me sir I'm getting crazy sir... Last video u said constructor doesn't participate in inheritance.... Reply me sir as soon as possible...
#include
using namespace std;
class base
{
public:
base()
{
cout
I liked your action at 9:02 at 1.5x !!:)
hahahahaha
Amazing
tq sir
In constructor class you told that constructor never participate in inheritance... Which is true
what type of binding is this?
if we create base class constructor instead of derived class constructor than what happened plz tell
i hve run that type output is just "base class constructor"
adipoli ...
👌👌
Is'nt forward declaration necessary for derived class?
Onnum parayanilla
Sir in he previous vedio of constructors you told that constructors never participate in inheritance and now what is this sir iam confused
manasa manu even i m confused
@@neelimasingh5005 the base class constructor did not inherit.actually it is called by drived class constructor.
@@sajidqureshi9954 can u please clarify because calling something from base class within derived is something we call inheritance . In case of member function also though it's inherited but to make it work we have to call member function within derived class
@@adarshjaiswal7334 Constructors are different from other class methods in that they create new objects, whereas other methods are invoked by existing objects.This is one reason that constructor aren’t inherited. Inheritance means a derived object can use a base-class method, but, in the case of constructors, the object doesn’t exist until after the constructor has done its work.
@@sajidqureshi9954 can u please explain with reference to the example in video as u told to invoke constructor we use new object and for other method we use existing object but I am confused as bcz there is only one object that is marks so what actually u want to say may u please example with example
Call by reference teach sir
In multilevel inheritance , which constructor will call first ?
Suppose,
Class A
{
A(){ }
}
Class B:public A
{
B(){ }
}
Class C:public B
{
C(){ }
}
Here i need to confirm that the first constructor will called is
A() then after
B() then after
C()
Is this order of constructor execution in multilevel inheritance is true ?
yes it is correct
this is not default constructors . this is also types of inheritance .u mixed up 4th chep and 3rd chep
Sir ur absolutely confusing me sir I'm getting crazy sir... Last video u said constructor doesn't participate in inheritance.... Reply me sir as soon as possible...
Try checking destructor lecture again
Sir in he previous vedio of constructors you told that constructors never participate in inheritance and now what is this sir iam confused
exactly!!!!!!!!!
i think we can't call that constructor again in this class; it automatically happens