Relationship between Virtual Functions, Pure Virtual Functions and Abstract Classes in OOP explained

  Рет қаралды 160,634

CodeBeauty

CodeBeauty

Күн бұрын

📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
Experience the power of practical learning, gain career-ready skills, and start building real applications!
This is a step-by-step course designed to take you from beginner to expert in no time!
💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.
Download Visual Assist here: bit.ly/WT-CB
I use it to enhance the performance, features, and support for C, C#, and C++ development in Visual Studio.
Download Ultra Edit here: bit.ly/UE-CB
It is a powerful, secure text editor designed specifically for programmers.
In this Object-Oriented Programming course, I'm explaining the relationship and purpose of virtual functions, pure virtual functions, and abstract classes.
C++ Virtual functions are functions defined in the base class and redefined in the derived class, whose main purpose is achieving runtime-polymorphism. Virtual functions are defined with the "virtual" keyword in the base class. You can find a detailed explanation and an example in this video, and I'll also show you how the runtime polymorphism achieved by using virtual functions looks like.
Pure virtual functions in C++ (abstract function) in C++ is a virtual function for which we don't write implementation in the base class, but we only declare it. In order to declare a pure virtual function, you need to assign 0 in the declaration
Abstract class in C++ is a class that has at least one pure virtual function. The classes which inherit the abstract class must provide a definition for the pure virtual functions, otherwise, they would be abstract themselves and you wouldn't be able to instantiate them.
The main purpose of an abstract class is to provide an appropriate base class from which other classes can inherit.
🎁 Create Modern Apps, 5x faster, with less code, Download FREE C++Builder Trial: bit.ly/CppBuilderFree
☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. Use the link to make a contribution: bit.ly/CodeBeauty_BuyMeACoffee
However, please don't feel obligated to do so. I appreciate every one of you, and I will continue to share valuable content with you regardless of whether you choose to support me in this way. Thank you for being part of the Code Beauty community! ❤️😇
Contents:
00:00 - Into
01:21 - Virtual Functions
12:21 - Pure Virtual Functions and Abstract Classes
17:28 - Polymorphism example
🎹 Fun fact, on my language accordion is called "Harmonika" like the word harmony.
Accordion compositions I like: bit.ly/compositionsILike
My favorite composition (The Danube Waves): bit.ly/TheDanubeWaves
Tag me on you Instagram stories:
Instagram 📸 - / truecodebeauty
Twitter 🐦- / truecodebeauty

Пікірлер: 443
@CodeBeauty
@CodeBeauty 2 жыл бұрын
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️ C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook 🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/ Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time! 💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10). Use it quickly, because it will be available for a limited time.
@Shad0wBenny
@Shad0wBenny 2 жыл бұрын
I would love to but your page only accepts PayPal. Please consider updating to other payment options.
@battosaijenkins946
@battosaijenkins946 2 жыл бұрын
@CodeBeauty, wow you code everyday like this?! Ur kinda cute!! 😋
@mba2ceo
@mba2ceo 2 жыл бұрын
Plz Provide link for CODE in Description
@juliuscesar4176
@juliuscesar4176 Жыл бұрын
You have explained to me what the book didn't explain. You have helped me create and compile my midterm project. Thank you very much! I wish you the best of success in all your endeavors.😀👍
@Blinkxys
@Blinkxys 7 ай бұрын
YOu have an amazing voice, i want to marry you
@MarianSyFy
@MarianSyFy 3 жыл бұрын
None of my University teachers were able to made programming look so easy like you do. Good job on being such a great teacher!
@CodeBeauty
@CodeBeauty 3 жыл бұрын
☺️🤗🧡
@adithyasankar4522
@adithyasankar4522 2 жыл бұрын
The fact that you decided to keep the nostalgia you got apart of this video shows how much effort you put into these thank you so much for these videos
@CodeBeauty
@CodeBeauty 2 жыл бұрын
🥰🥰
@uwelab6590
@uwelab6590 5 ай бұрын
Finally someone who explains things as simple as they are and does not complicate them. Thanks
@Lordcarlox
@Lordcarlox 3 жыл бұрын
I'm always amazed how this OOP videos can summarize 1 week of formal programming courses. They are rudimentary, but an ideal start.
@Boba0514
@Boba0514 3 жыл бұрын
Thank you so much for this video, I just got my first tech job as a C++ developer, and the only C++ questions during the interview were about virtual functions, so you helped me get the job!
@notappi3982
@notappi3982 3 жыл бұрын
Leterally u can beat any professor in teaching skills.
@CodeBeauty
@CodeBeauty 3 жыл бұрын
☺️🤗🧡
@charlesmaganga8430
@charlesmaganga8430 Жыл бұрын
Absolutely
@mashmixture5662
@mashmixture5662 Жыл бұрын
Exaxtly
@michaelisnardi6380
@michaelisnardi6380 2 жыл бұрын
Thank you for teaching the world C++ in logical, bite-size chunks! I am a longtime C programmer and am just getting up to speed on C++. Your course is helping me do that with minimum effort. I was prompted to leave a comment because I too played the accordion when I was young and I too miss playing it!
@hamzah7025
@hamzah7025 2 жыл бұрын
YOU ARE AN AMAZING TEACHER. I dont need to check for someone else's tutorial. I am always sure that your tutorial is all I need to understand OOP.
@MatheusA-xo6vc
@MatheusA-xo6vc 3 жыл бұрын
Grateful for your work! 👏🏻👏🏻👏🏻
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Much appreciated! 🙏💙
@nothingiseverperfect
@nothingiseverperfect 2 жыл бұрын
Oh girl you are blowing my professors and teachers out of the WATER 😭😭😭😭 bless your soul queen 🙌🙌😭😭 I hope you make it to heaven
@CodeBeauty
@CodeBeauty 2 жыл бұрын
Thanks so much ☺️🥰🥰
@chanakasworkspace2528
@chanakasworkspace2528 Жыл бұрын
Thanks a lot for this! I watched this video about an hour before my exam and it helped me do what I was supposed to do. Everything's clear and concise. You're a brilliant teacher!
@nikolaystoychev7170
@nikolaystoychev7170 2 жыл бұрын
The most unique video I've ever seen. It is incredibly well explained and completely comprehensive. Well done!
@adhel-estebanriverarodrigu2234
@adhel-estebanriverarodrigu2234 2 жыл бұрын
And here I was studying and now I just got sidetracked by the accordions... I don't regret it. Thanks for your invaluable help in the videos! You truly have a deep knowledge and talent in teaching programming! Keep up the great work!
@sahibpreetsingh8695
@sahibpreetsingh8695 2 жыл бұрын
This teacher has a great art of simplifying things such that even a new student is able to take out the core meaning from her session. Good Job teacher
@anmolnuri10
@anmolnuri10 2 жыл бұрын
I was so daunted by what this topic had in stored but you made it really simple to comprend. I appreciate you and your value to the coding community. Thank you !!!
@hazaonly
@hazaonly 2 жыл бұрын
Thank you Sensei! You taught me passion, patience, precision, peace and Abstract Classes. 🙏 🙇
@-_-5070
@-_-5070 2 жыл бұрын
I just loved how clear and confident you are while teaching, pleased that I've found your channel♥️😊
@ritika2563
@ritika2563 3 жыл бұрын
Love Ur work. Explanations are never complex , but build from the basic up to total completeness.
@sketchyboi1491
@sketchyboi1491 Жыл бұрын
I must say, I'm so glad I found this video. I was having a really hard time understanding the concept of virtual functions for months. This demotivated me and caused me to take a long break from learning C++. However, after watching YOUR explanation of it, I actually understand the concept now and the purpose of using it. I've had more confidence in learning the language since then. Thanks!
@cmod8099
@cmod8099 Жыл бұрын
Like the Fleetwood Mac song goes .... You make learning Fun! Many Thanks.
@moneynamazi5893
@moneynamazi5893 2 жыл бұрын
Watched so many tutorials about virtual functions. None of them was this good. Awesome example for virtual functions
@dianelysrocha7156
@dianelysrocha7156 2 жыл бұрын
This is so interesting. Thank you for the time you invest on your videos. I come from Java, and I find myself fighting my brain on syntax a lot. Thanks to you that process has become way easier.
@michaellundgren6949
@michaellundgren6949 3 жыл бұрын
I watched many c++ tutorials and this was the first video I watched that I allowed me to understood this concept! Thanks!
@CodeBeauty
@CodeBeauty 3 жыл бұрын
That is great to hear 🤗😃😃
@moularaoul643
@moularaoul643 3 жыл бұрын
Your way of teaching is very educational!!! Thank you for this chapter.
@_nabin_8848
@_nabin_8848 9 ай бұрын
wow this video clear out all of my confusion related to the virtual function. thanks a lot for that.
@alikhatami6610
@alikhatami6610 3 жыл бұрын
love your videos . they are pretty specific . thank you
@ashah123123
@ashah123123 3 жыл бұрын
Welcome back after a long break. You are amazing teacher.
@caraqingge7845
@caraqingge7845 2 жыл бұрын
Thank you so much for your video!
@veronicas3668
@veronicas3668 2 жыл бұрын
Thanks! Your channel is so helpful!!
@shaboobis9283
@shaboobis9283 2 жыл бұрын
Excellent lesson. Your teaching is concise and refreshing.
@niteshkoli007
@niteshkoli007 Жыл бұрын
your way of teaching also like pure virtual function forces me to understand the topic easily.😁thank you so much.
@OmgThisssguy
@OmgThisssguy 2 жыл бұрын
Phenomenal teaching, thank you for explaining it so clear!
@elizabethc.9215
@elizabethc.9215 2 жыл бұрын
Thank you for sharing the accordion story!
@s1mplelance964
@s1mplelance964 2 жыл бұрын
Thank u so much for this great explanation!
@majdijaiel6668
@majdijaiel6668 3 жыл бұрын
Awesome video ! much appreciated
@vinayakdhavali1337
@vinayakdhavali1337 3 жыл бұрын
You made it so simple. Thank you 😊
@hidemat5141
@hidemat5141 2 жыл бұрын
Saldina, thanks for your videos. I've been trying to learn c++ for so long, but always get deterred and bored. You present c++ in a consumable format. So I'm finally learning it. :)
@jasnarmstrng
@jasnarmstrng Жыл бұрын
The accordion nostalgia bit was a nice touch. Looking forward to creating a concert in C++. Instrument class example 👍
@alejandromackay3074
@alejandromackay3074 2 жыл бұрын
Thanks!!! Excellent explanation
@edwardoliveira1748
@edwardoliveira1748 Жыл бұрын
This helped me alot to understand these. Thank you.
@harshchandwani9781
@harshchandwani9781 Жыл бұрын
Thanks for making such a clear explanation to the virtual and pure virtual function
@krishnakadadi5394
@krishnakadadi5394 2 жыл бұрын
You made this easy to understand .Thank you :)
@RupamSasmalYt
@RupamSasmalYt 2 жыл бұрын
Great explanation !
@Jabrownie23
@Jabrownie23 2 жыл бұрын
Thanks for sharing the accordion link with the Just Duet channel. It was very amusing to hear the "Super Mario Bros" and "Still Dre" songs. I chuckled a bit seeing how straight their faces looked as they played. I hope you'll continue with your passion in playing the accordion, it sounds like a wonderful instrument meant for a wonderful person.
@dsears
@dsears 2 жыл бұрын
You are a great teacher. Thank you.
@shibashabatnotski5163
@shibashabatnotski5163 2 жыл бұрын
Thank you so much for such good quality video's! i am currently studying for an exam to the army and your vids present the needed knowledge very well!
@zaitmartinez5502
@zaitmartinez5502 2 жыл бұрын
Thanks a lot for your teachings!
@hbm293
@hbm293 3 жыл бұрын
The accordion choices are great! The hungarian čardaš remembered me about a passage of Brahms' Hungarian dance n°4
@midastouchh
@midastouchh 3 жыл бұрын
The way you teach c++ makes it more simple... Nice work ma'am.
@jiahuili2133
@jiahuili2133 2 жыл бұрын
Very good examples to explain the concept.
@anwar6971
@anwar6971 3 жыл бұрын
Thanks. For making things clear
@easylearning1207
@easylearning1207 3 жыл бұрын
Finally 😍I was waiting for oop tutorials
@saishraut4139
@saishraut4139 2 жыл бұрын
Thank you so much. Good explanation
@Byynx
@Byynx Ай бұрын
Very helpful. Thanks.
@mustafaaltay4920
@mustafaaltay4920 Жыл бұрын
Clear, informative and gorgeous videos. Many thanks for amazing C++ tutorials dear Saldina, greetings from Turkey 👍
@jojo_v5395
@jojo_v5395 3 жыл бұрын
such a clear and smart explanation. thanks so much
@salihbarknakkaya8101
@salihbarknakkaya8101 3 ай бұрын
It is so nice to see the real BEAUTY OF CODE! Thank you so much for sharing these beneficial informations with us, you literally 100 times better than my profs.
@CodeBeauty
@CodeBeauty 3 ай бұрын
🥰🥰
@cbc2977
@cbc2977 2 жыл бұрын
Great Video. This was very helpful
@ilkay3359
@ilkay3359 3 жыл бұрын
thank you for all your efforts.
@Sneaky1ne
@Sneaky1ne 2 жыл бұрын
incredible playlist
@compactcoder
@compactcoder Жыл бұрын
Thank you so much!!
@felipevalles3831
@felipevalles3831 3 жыл бұрын
Nunca había aprendido tantas cosas en tan poco tiempo eres una excelente maestra 😉. Saludos desde Lerdo, Durango. Mx.
@naveedullah5314
@naveedullah5314 2 жыл бұрын
its very helpful ... explained in one of the best way.....
@mahmoudmostafa9028
@mahmoudmostafa9028 3 жыл бұрын
With your style, you make learning easier
@CodeBeauty
@CodeBeauty 3 жыл бұрын
🙏💙
@mahmoudmostafa9028
@mahmoudmostafa9028 3 жыл бұрын
@@CodeBeauty 😍😍😍😍😍
@atharvachundurwar5311
@atharvachundurwar5311 2 жыл бұрын
Great Video!!
@fernandoalbuquerque6645
@fernandoalbuquerque6645 3 жыл бұрын
Amazing explanation. It's a tough subject for understanding but....you saved my night.
@cengizhankahraman4326
@cengizhankahraman4326 Жыл бұрын
As an electonics engineering student, I love u r tutorials. Thanks for your nice explanation. greetings from Turkey :)
@volkers407
@volkers407 2 жыл бұрын
Thanks for this video.
@francescofaccodelagarda5408
@francescofaccodelagarda5408 3 жыл бұрын
thank you again.. so clear and well explained.. .. btw, I'd LOve to see you playing the accordion!
@MrAkeboshiWind
@MrAkeboshiWind 2 жыл бұрын
Very clear explanation, thank you a lot :)
@md.saifulislam6528
@md.saifulislam6528 2 жыл бұрын
Most convinent one....thanks for making this video.
@1tav0
@1tav0 8 ай бұрын
Your channel is a goldmine of knowledge thank you so much
@roros2512
@roros2512 3 жыл бұрын
the notation used in 06:44 Instrument* i1 = new Accordion( ); it is also used in linked list as Node* newNode = new Node( ); but I do not understand why this is done in this way, any help? thanks! thanks teacher Saldina!
@riddhithbanerjee
@riddhithbanerjee 4 ай бұрын
Thanks Saldina...It was a great video ❤❤
@moaz_king_1001
@moaz_king_1001 6 ай бұрын
thx very much this video really helped me alot .. your videos are really easy to understand and very helpful
@khandakerrakibulhasan
@khandakerrakibulhasan 2 жыл бұрын
I really like your teaching style. Your explanation was awesome . 🥰
@byullmoon
@byullmoon 2 жыл бұрын
thank you I love your videos , do detailed and awesome 🍓🍓
@mittom7628
@mittom7628 2 жыл бұрын
Svaka čast, prepametna i prelepa Mostarko
@CodeBeauty
@CodeBeauty 2 жыл бұрын
🙏 ❤️
@madhusankawijerathne8435
@madhusankawijerathne8435 Жыл бұрын
Thank you!
@namehere630
@namehere630 2 жыл бұрын
very nice explanation. thank you :))
@programtin
@programtin Жыл бұрын
the best video i have ever seen about oop 🤞
@hansikathathsarani3762
@hansikathathsarani3762 2 жыл бұрын
Today example taken to describe is awesome.
@hamzatarek6975
@hamzatarek6975 Жыл бұрын
So good and so easy explain , thank you
@adarshbharti8782
@adarshbharti8782 2 жыл бұрын
Crystal clear topic thanx madam...
@maytezhou2585
@maytezhou2585 3 жыл бұрын
First time I see you getting so emotional. Sometimes I get emotional like that. And tears just come up from my eyes without noticing. Thank you for the video. You explained it so well. I am learning this on my c++ course at university and this is really helpful!
@user-yy9zs7ff6r
@user-yy9zs7ff6r 7 ай бұрын
Thank you saldina your videos are helping me a lot in my university works.☺
@jasonwilliams8730
@jasonwilliams8730 3 жыл бұрын
Great video
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Thanks! 🙏💙
@mohdattia8653
@mohdattia8653 2 жыл бұрын
Great work
@ikasugami
@ikasugami 3 жыл бұрын
Ya, I used to play Bassoon in school for a while, and I get nostalgic for that from time to time like when I hear some music with a prominent bassoon part.... Thank you for sharing about playing the accordion!
@CodeBeauty
@CodeBeauty 3 жыл бұрын
☺️🤗🧡
@cbanow
@cbanow 2 жыл бұрын
Excellent interpretation of Argentina. A. Piazzolla - Libertango in your link ... Thank you !!!
@zoro-i
@zoro-i Жыл бұрын
you are just so perfect i love your vids
@nazmulhaquenahin
@nazmulhaquenahin 2 жыл бұрын
I am just fallen in love the way you teach and your explanation
@ernestrobert5575
@ernestrobert5575 2 жыл бұрын
I love your videos ! :D
@anonymousbelgique7331
@anonymousbelgique7331 2 жыл бұрын
thank you....really thank you ..
@dekafmusic
@dekafmusic Жыл бұрын
Your explanation is really superb.
@bigtymer4862
@bigtymer4862 2 жыл бұрын
Thank you for the clear explanation
@AnandKumar-dc2bf
@AnandKumar-dc2bf Жыл бұрын
Such a clear explanation, and u have a very nice smile. god bless U....
@lioz8274
@lioz8274 3 жыл бұрын
You are the best!
@mahmoudmostafa9028
@mahmoudmostafa9028 3 жыл бұрын
Thanks for your efforts
Virtual Functions in C++ | C++ Tutorials for Beginners #56
11:02
CodeWithHarry
Рет қаралды 395 М.
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 33 МЛН
Heartwarming: Stranger Saves Puppy from Hot Car #shorts
00:22
Fabiosa Best Lifehacks
Рет қаралды 21 МЛН
1❤️
00:17
Nonomen ノノメン
Рет қаралды 13 МЛН
WHY IS THE HEAP SO SLOW?
17:53
Core Dumped
Рет қаралды 208 М.
Virtual Functions & Abstract Classes in C++ | C++ Programming Tutorials
15:12
C++ OOP - What is polymorphism in programming? (simple example)
15:20
Async JavaScript & Callback Functions -- Tutorial for Beginners
24:21
The Unreasonable Effectiveness Of Plain Text
14:37
No Boilerplate
Рет қаралды 591 М.
Faster than Rust and C++: the PERFECT hash table
33:52
strager
Рет қаралды 522 М.
Clicks чехол-клавиатура для iPhone ⌨️
0:59
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 8 МЛН
Красиво, но телефон жаль
0:32
Бесполезные Новости
Рет қаралды 444 М.