Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

#30 OOP Part-2: Inheritance in C and C++

22.5K views on YouTube

This second lesson on Object-Oriented Programming (OOP) introduces the concept of Inheritance, which is a mechanism for reusing common attributes and operations among classes. You’ll see how you can emulate Inheritance in C, what kind of code is generated, and how to debug such code. Next, you will translate the C design into C++ using a class and again you inspect the generated code to compare it with C. Finally, you will see how to *think* about inheritance and not confuse it with class composition.

——
Resources:

Companion web page for this video course:
https://www.state-machine.com/quickstart

GitHub repository for projects for this video course:
https://github.com/QuantumLeaps/modern-embedded-programming-course

Transcript of this lesson:
https://www.state-machine.com/course/lesson30.txt

Music credits:
The background music comes from:
https://www.bensound.com/royalty-free-music/track/straight