MultiPath Inheritance In C++

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ม.ค. 2025

ความคิดเห็น • 20

  • @adisingh9341
    @adisingh9341 3 ปีที่แล้ว

    Helped me a ton . Thanks

    • @CppNuts
      @CppNuts  3 ปีที่แล้ว +1

      Glad it helped!

  • @LearnYardYT
    @LearnYardYT 6 ปีที่แล้ว +1

    What are the difference in inheriting base into derived and creating an object of base inside derived ?
    Can u please provide Differences in their construction (constructor call)and memory allocation and other things if they exits

    • @CppNuts
      @CppNuts  6 ปีที่แล้ว +1

      Sure will try!!

    • @LearnYardYT
      @LearnYardYT 6 ปีที่แล้ว +1

      @@CppNuts thank u sir
      And if u don't get time any soon plz do text a text reply about it plz

    • @CppNuts
      @CppNuts  6 ปีที่แล้ว +2

      I have a video on this topic please check that once (IS-A and HAS-A Relationship).
      If further doubts we can discuss .
      Link: th-cam.com/video/gHiURx5Hby8/w-d-xo.html

    • @LearnYardYT
      @LearnYardYT 6 ปีที่แล้ว

      @@CppNuts watched that video
      Now I know that both the relationship uses same memory allocation and same sequence of construction and destruction.
      We we can't use them interchangeably right?
      What are the situation where it makes difference.

  • @tlhomotsemoteme2423
    @tlhomotsemoteme2423 6 ปีที่แล้ว +1

    Hello
    Below is a function from a class called Container, now I know that I am giving you less to work with but I would appreciate it if you were to cover something called delegation. I understand that it is something of the syntax below, especially the 'end' colon then calling another function...
    Container::Container(const Container& objOrig) : Container(objOrig._size)
    I hope you understand what I am trying to convey and I would appreciate your help.

    • @CppNuts
      @CppNuts  6 ปีที่แล้ว +1

      I have video on constructors delegation. Please try that one.

    • @tlhomotsemoteme2423
      @tlhomotsemoteme2423 6 ปีที่แล้ว +1

      @@CppNuts
      Thank you so much, your work is highly appreciated.

  • @huseyinerensahin9277
    @huseyinerensahin9277 2 ปีที่แล้ว

    I put cout to the constructors. While not using the virtual keyword, declaring an instance of class Rupesh, Human Constructor is called only once. However, in the video you are saying that it creates Human twice. How could that be possible?

  • @abdur_raffay01
    @abdur_raffay01 ปีที่แล้ว

    Can anyone Kindly tell the name of this compiler?

    • @CppNuts
      @CppNuts  ปีที่แล้ว

      Vscode or sublime text editor

  • @zainuldin9095
    @zainuldin9095 3 ปีที่แล้ว +1

    u are Lengend😘

    • @CppNuts
      @CppNuts  3 ปีที่แล้ว

      No i am not but, thanks for your love.

  • @sumitnaik1990
    @sumitnaik1990 6 ปีที่แล้ว +1

    How virtual keeps only one human class in rupesh class

    • @CppNuts
      @CppNuts  6 ปีที่แล้ว +1

      When there is a virtual inheritance then compiler knows that how to deal with it. Actually human is created only once and its pointer is copied to TH-camr class Engineer class and Rupesh class.
      So that they all can to one single Human class.
      I hope this would help!!

    • @aadimanchekar1032
      @aadimanchekar1032 4 ปีที่แล้ว

      @@CppNuts thanks

  • @JKA-sf7ll
    @JKA-sf7ll 3 ปีที่แล้ว

    Rupesh is coder not human..hahaha
    just kidding

    • @CppNuts
      @CppNuts  3 ปีที่แล้ว

      haha..