In this video I go over how to do inheritance in C++. Along with this I explain how to use Protected Variables and how Public and Protected are affected by Inheritance. I also cover Multiple Inheritance and explain the risks of using it, including the Diamond Problem, along with how to solve some of the common issues associated with it.
Credits where Credits are Due:
-Subscribe End Screen: Graphicki • Video
-Live Animation: Motion Chroma | Leader • Livestream Intro [Free to Use] ♥
-Music: Song: Without You, Artist: MNRVA, / ximertracks
-Streaming Software: OBS
Thank you for watching!
00:00 Intro/Topic overview
00:38 Why use Inheritance?
09:56 Inheritance
15:42 Inheritance example
23:17 Inheriting public/private variables
27:54 Structs vs. classes
30:42 Battery example
33:28 Battery inheritance example
45:45 Public/Protected/Private chart
50:30 Inheritance code example
1:02:24 Multiple Inheritance
1:18:13 The Diamond Problem