MultiPath Inheritance In C++

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024
  • JOIN ME
    -----
    RUclips 🎬 / @cppnuts
    Patreon 🚀 / cppnuts
    COMPLETE PLAYLIST
    ------------
    C++ Tutorial For Beginners: • Introduction To C++
    STL (Standard Template Library): • STL In C++
    ThreadIng In C++: • Multithreading In C++
    Data Structures: • Data Structure
    Algorithms: • Binary Search
    Design Patterns: • Factory Design Pattern...
    Smart Pointers: • Smart Pointer In C++
    C++14: • Digit Separator In C++
    C++17: • std string_view in C++...
    C++ All Type Casts: • static_cast In C++
    INTERVIEW PLAYLIST
    ------------
    C++ Interview Q&A: • Structural Padding & P...
    C++ Interview Q&A For Experienced: • How delete[] Knows How...
    Linked List Interview Questions: • Find Kth Node From Bac...
    BST Interview Questions: • Search Element In Bina...
    Array Interview Questions: • Reverse An Array
    String Interview Questions: • Check String Is Palind...
    Bit Manipulation Questions: • Find Set Bit In Intege...
    Binary Tree Interview Question: • Invert Binary Tree
    Sorting Algorithms: • Bubble Sort
    C++ MCQ: • Video
    C MCQ: • What printf returns af...
    C Interview Questions: • Designated Initializat...
    QUICK SHORT VIDEOS
    -------------
    C++ Short : • C++ Short Videos
    C Short : • Shorts C Programming MCQ
    In this video we will learn the Multipath Inheritance In C++ programming language.
    Few points to remember about the multipath inheritance are as follows:
    1. A derived class with two base classes and these two base classes have one common base class is called multipath inheritance.
    For more details please watch full video and do let me know if there is any doubts in comment section.
    #inheritance #oops #cpp #programming #tutorial #computerscience #softwareengineering

Комментарии • 20

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

  • @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: ruclips.net/video/gHiURx5Hby8/видео.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.

  • @huseyinerensahin9277
    @huseyinerensahin9277 Год назад

    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?

  • @adisingh9341
    @adisingh9341 3 года назад

    Helped me a ton . Thanks

    • @CppNuts
      @CppNuts  3 года назад +1

      Glad it helped!

  • @abdur_raffay01
    @abdur_raffay01 9 месяцев назад

    Can anyone Kindly tell the name of this compiler?

    • @CppNuts
      @CppNuts  9 месяцев назад

      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 RUclipsr 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 2 года назад

    Rupesh is coder not human..hahaha
    just kidding