Multiple Inheritance Deep Dive | C++ Tutorial

  Рет қаралды 9,374

Portfolio Courses

Portfolio Courses

2 жыл бұрын

A deep dive into multiple inheritance in C++, covering how it works, and resolving the ambiguities that can result from multiple inheritance, as well as handling the diamond problem (including how constructors work in this situation) . Source code: github.com/portfoliocourses/c.... Check out www.portfoliocourses.com to build a portfolio that will impress employers!

Пікірлер: 24
@romainmorel3343
@romainmorel3343 Жыл бұрын
Really hard to find good ressources on diamond inheritance, this is pure gold ! Thanks a lot !
@PortfolioCourses
@PortfolioCourses Жыл бұрын
You're welcome Romain, I'm glad you found the video helpful! :-)
@dominiorrr6510
@dominiorrr6510 Жыл бұрын
Glad I found this video, it answered literally every single question I had regarding multiple inheritance. Thanks for the video.
@PortfolioCourses
@PortfolioCourses Жыл бұрын
I’m glad the video answered your questions, and you’re welcome! :-)
@dannggg
@dannggg Жыл бұрын
Reviewing for an interview because I’m a Java coder. And ran into this video. Love it. Straight to the point. Clear and understandable
@PortfolioCourses
@PortfolioCourses Жыл бұрын
Thank you very much for the kind and positive feedback. :-) And good luck on your job interview!!!
@MrIgorek123
@MrIgorek123 2 жыл бұрын
Thanks man for this video! Very clear and easy to understand, keep doing!
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
You're welcome, I'm glad to hear you enjoyed it, and I'll definitely keep making videos. 🙂
@amaama4140
@amaama4140 7 ай бұрын
Wow, Great job. Thanks for this quality learning material.
@hamdansiddiqui3294
@hamdansiddiqui3294 7 ай бұрын
Simple, and to the point, hard to find these kind of resources on yt
@harishkuppam5756
@harishkuppam5756 Жыл бұрын
So in default constructor of BaseClass1, if we inialize a value member of BaseClass1, it will not be initialized when derived class object is made? Because Common base class constructor is called?
@eh4756
@eh4756 2 жыл бұрын
That was what I was exactly searching for thanks
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
You’re welcome! :-)
@ertemeren
@ertemeren 8 ай бұрын
I think that having a full-screen view, which would allow us to see all the code at once, might be better. Scrolling make it not easy to follow
@ekaeo
@ekaeo 2 жыл бұрын
Amazing
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
I’m glad you like it! :-)
@TheRojo387
@TheRojo387 Жыл бұрын
So for the case of NURBS, the inheritance ladder goes Bézier (the root)-B-Spline-Non-uniform/Rational (two peer classes)/NURBS (inheriting from both Non-uniform and Rational).
@PortfolioCourses
@PortfolioCourses Жыл бұрын
I had not heard of NURBS until you left this comment, I'm researching it now. :-)
@TheRojo387
@TheRojo387 Жыл бұрын
@@PortfolioCourses I took quite the interest in spline curves since I have worked with them via Realsoft and Blender (though Realsoft only uses NURBS as it's an industry standard), and am even incorporating them into some software of my own creation. The name NURBS is an acronym for Non-Uniform Rational Basis Spline. Be warned; I'm writing software designed to make you THINK!
@PortfolioCourses
@PortfolioCourses Жыл бұрын
Cool! :-)
@didiTchu
@didiTchu Жыл бұрын
could you do c++ exceptions tutorial
@PortfolioCourses
@PortfolioCourses Жыл бұрын
Yes, that is a topic I've wanted to do for a long time now. The only problem I'm having is that it's difficult to know what topics to include in what videos. Exceptions get pretty complicated. I've thought about doing a short introduction video followed by an in-depth video, but with exceptions it's tricky to know when to "cut things off". :-)
@IsaacC20
@IsaacC20 Жыл бұрын
@3:14 Incorrect. function1() isn't overridden *at all* because neither base classes declare function1() as virtual. The static type of "derived'" is DerivedClass so at runtime DerivedClass::function1() is called. If it *was* overridden (which it is not) then, given this code: DerivedClass dc1; BaseClass2 *bc2ptr = &dc1; bc2ptr ->function1(); // This line would print "Function1 DerivedClass" But instead it prints out "Function1 BaseClass2".
@PortfolioCourses
@PortfolioCourses Жыл бұрын
No that is incorrect, the video correctly identifies the function1() as being overridden. The keyword virtual is not required for a function to be overridden: www.geeksforgeeks.org/function-overriding-in-cpp/. The virtual keyword is used for dynamic binding / polymorphism which is a related concept: www.geeksforgeeks.org/dynamic-binding-in-cpp/. Because the comment is incorrect I'll be deleting it shortly, I don't want viewers trying to learn to be confused, but I'll try to leave this up for a bit for you to see it.
Protected Class Members | C++ Tutorial
5:46
Portfolio Courses
Рет қаралды 4,6 М.
Introduction To Inheritance | C++ Tutorial
9:38
Portfolio Courses
Рет қаралды 19 М.
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 54 МЛН
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 28 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,7 МЛН
ВОДА В СОЛО
00:20
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 33 МЛН
Arrays in C++
18:31
The Cherno
Рет қаралды 419 М.
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 921 М.
Define A Copy Constructor To Create A Deep Copy Of An Object | C++ Tutorial
17:06
Friend Functions | C++ Tutorial
13:05
Portfolio Courses
Рет қаралды 9 М.
Operator Overloading Using Friend Functions | C++ Tutorial
15:04
Portfolio Courses
Рет қаралды 8 М.
new & delete Operators For Dynamic Memory Allocation | C++ Tutorial
15:52
Portfolio Courses
Рет қаралды 27 М.
Virtual Destructors | C++ Tutorial
10:07
Portfolio Courses
Рет қаралды 2,9 М.
Object-Oriented Programming is Embarrassing: 4 Short Examples
28:03
C++ OOP - What is inheritance in programming?
16:32
CodeBeauty
Рет қаралды 138 М.
Epic Beach Day! Digging a Massive Hole!
0:12
MELIAH & DAD (THE PONTES FAMILY)
Рет қаралды 6 МЛН
Черёмуха во рту вяжет
0:11
Pavlov_family_
Рет қаралды 925 М.
30 luglio 2024
0:15
Leonardograti
Рет қаралды 10 МЛН