C++ Tutorial: Inheritance, Polymorphism, Virtual Functions, Abstract Base Class

preview_player
Показать описание

In this video, I write a short program that utilizes the object-oriented programming principles of polymorphism and inheritance.

Inheritance: ~1:30
base class/derived class constructors ~9:00
virtual functions/dynamic binding/abstract base class: ~20:00
polymorphism: ~28:20

// Consider supporting this channel in multiple ways
Bitcoin: 177wfkQwzXiC8o2whQMVpSyuWUs95krKYB

// Learn More -- Check out my complete C++ play list:
Рекомендации по теме
Комментарии
Автор

Great tutorial :) Thanks. So much better at explaining everything in 35 min than an hour and half class that i'm taking. Much appreciated!

jumpys_
Автор

Very clear. Not many explain the motivation behind using polymorphism but yours was very good. Thank you.

locallion
Автор

i was struggling with virtual function now you simplified it thanks a lot.

tamburaimashonganyika
Автор

Awesome video! Extremely clear and concise. You wrote everything out even though it would have taken a bit more time, but it actually helps to see every little piece drawn out.

kaitlynfox
Автор

Excellent refresher with some great, straightforward explanations. Thank you!

higheredjohn
Автор

Thanks a lot, very helpful :)
and btw, because of some other comments that claim this to be the most useful video among others they checked, i consider myself lucky that i found this video first :D on my search

giwrgosapo
Автор

Cleared it all up for me! Hope to see you in my upper divisions next spring!

tannerbarcelos
Автор

Great tutorial man, thanks. Also taught me the use of const in accessor functions which I never knew about.

seanmurtagh
Автор

So why dont Triangle class have a word "virtual" ahead of getArea() function?

splendidzr
Автор

Great video, really helped me wrap my head around all this sort of stuff. I actually liked how you was slipping up a little since it meant I was identifying where you were making typos and mistakes before you corrected them hahaha. Liked and subscribed (Y)

zeppelin
Автор

Amazing video! Thank you for implementing these topics together, it was very informative.

iistrideii
Автор

Great tutorial. Absolutely amazing, so much better than my current professor

julp
Автор

thank you so much for the video . it is really clear and helpful!! :)

sukald
Автор

Excellent video! learned a lot of things.

Wrtvrxgvcf
Автор

Thanks a lot Professor Hank. This was very helpful.

TheRobiel
Автор

Thanks Alot, This is the best tutorial about OOP in C++.

One more thing why did you used the const keyword in class functions, i know it's for constants, but why classes?

abdelouery
Автор

Thank you for the video. It helped further understand the material.

cfloresana
Автор

Very good explanation of the example. Although at 8:10, the public access specifier makes the protected members of the derived class protected not private. Also, you should free the shapes array. I don't want to sound like a know it all. I understand it takes a lot of effort in making these videos. Anyways thank you for making nice videos.

mrchiragjain
Автор

Thank you, this was very clear explanation

husseinalaa
Автор

Two unmentioned pluses: There are actual human pauses between sentences.  Not the usual staccato technique.  And, the cadence is more normally paced.  Seems like lots of  others race along like they have somewhere else they need to be in the next five minutes.  Thanks!

dougp