Default Constructors in Inheritance | C++ Tutorial | Mr. Kishore

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 29

  • @ajaykharat8689
    @ajaykharat8689 6 років тому +6

    #include
    using namespace std;
    class base
    {
    public:
    base()
    {
    cout

  • @mohitbhandari8757
    @mohitbhandari8757 4 роки тому +3

    I liked your action at 9:02 at 1.5x !!:)

  • @chahatvamdev4088
    @chahatvamdev4088 2 роки тому

    Amazing

  • @swaminisawle6141
    @swaminisawle6141 3 роки тому

    tq sir

  • @aappasamy5689
    @aappasamy5689 Рік тому

    In constructor class you told that constructor never participate in inheritance... Which is true

  • @adarshverma3372
    @adarshverma3372 5 років тому

    what type of binding is this?

  • @armghangul4501
    @armghangul4501 4 роки тому

    if we create base class constructor instead of derived class constructor than what happened plz tell

    • @kartikpandey1950
      @kartikpandey1950 4 роки тому

      i hve run that type output is just "base class constructor"

  • @vishnuag2510
    @vishnuag2510 6 років тому

    adipoli ...

  • @sourabhdashore3088
    @sourabhdashore3088 5 років тому

    👌👌

  • @americacaptain7140
    @americacaptain7140 3 роки тому

    Is'nt forward declaration necessary for derived class?

  • @melvingeorge10
    @melvingeorge10 6 років тому

    Onnum parayanilla

  • @manasamanu4741
    @manasamanu4741 6 років тому

    Sir in he previous vedio of constructors you told that constructors never participate in inheritance and now what is this sir iam confused

    • @neelimasingh5005
      @neelimasingh5005 6 років тому

      manasa manu even i m confused

    • @sajidqureshi9954
      @sajidqureshi9954 6 років тому +2

      @@neelimasingh5005 the base class constructor did not inherit.actually it is called by drived class constructor.

    • @adarshjaiswal7334
      @adarshjaiswal7334 5 років тому +2

      @@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

    • @sajidqureshi9954
      @sajidqureshi9954 5 років тому +1

      @@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.

    • @adarshjaiswal7334
      @adarshjaiswal7334 5 років тому

      @@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

  • @anithar6996
    @anithar6996 6 років тому

    Call by reference teach sir

  • @manalisamani6729
    @manalisamani6729 5 років тому

    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 ?

  • @piyupatel2092
    @piyupatel2092 5 років тому +1

    this is not default constructors . this is also types of inheritance .u mixed up 4th chep and 3rd chep

  • @srishtimishra5101
    @srishtimishra5101 4 роки тому +1

    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...

    • @DexterousKid1
      @DexterousKid1 4 роки тому

      Try checking destructor lecture again

  • @krpj5s436
    @krpj5s436 4 роки тому +1

    Sir in he previous vedio of constructors you told that constructors never participate in inheritance and now what is this sir iam confused