What is INHERITANCE in C++? 👨‍👧‍👧

preview_player
Показать описание
#inheritance #parent #child

C++ inheritance tutorial example explained
Рекомендации по теме
Комментарии
Автор

#include <iostream>

class Animal{
public:
bool alive = true;

void eat(){
std::cout << "This animal is eating\n";
}
};
class Dog : public Animal{
public:

void bark(){
std::cout << "The dog goes woof!\n";
}
};
class Cat : public Animal{
public:

void meow(){
std::cout << "The cat goes meow!\n";
}
};

int main() {

Dog dog;
Cat cat;

std::cout << dog.alive << '\n';
dog.eat();
dog.bark();

return 0;
}

BroCodez
Автор

Congrats on making it this far soldier

justpurple
Автор

We've reached it guys, Now there's even a greater path to follow. The path of development

normalguy
Автор

I have completed your C++ tutorial course. I learn a lot basic and skills in your channel. You are a great teacher. Thanks a lot...

kenji_
Автор

Finally reached the end of it. Thank you for this playlist, i have now learned the basics of C++.!

alejandrobh
Автор

Great Stuff Bro, thanks for all the knowledge. I'll be going into DSA and competitve coding from here and learn further. Best of luck to all who reached here after me. I hope you achieve what you are working so hard towards.

Anonymous-stvk
Автор

Thank you Sir! Brilliant lesson plans and teaching.

OllyCybSec
Автор

We made it gang! Thank you bro! Now unto the next path! Lets make games!

dj_aljnmusic
Автор

hi bro code, i just finished all of these videos in this series and I wanna say - a big thankyou. brilliant vids, crisp voice and bitesize organised vids. thankyou making this free content for everyone to learn

anjxlxo
Автор

We made it guys, now comes the hard part :)

prantoislam
Автор

Love your channel. The concise intro / outro and your efficient speech are appreciated. Thanks for making these videos!!! You’re a legend : )

johnyackanech
Автор

Thank you for making this amazing course.

Adarssh-pwcj
Автор

i started watching this series on december 28th 2023. I finished this series on January 14th 2024. why it take so long is 50% life get in the way (especially school) and 50% procastination. and i think vector and using function from other file is missing here but i can just learn those myself i guess. thank you for this series it help start my programming career (literally my first programming language)

willlagergaming
Автор

made it this far and ngl your videos are really helpful, please keep up the good work!

yellow
Автор

The Ctor is acting like a Class Method with no need to have a Return Type.
I think that is really powerful, when the Ctor is called with a New Up'd object, it carries the completed calculations back to the new-up object - 🤯🤯🥳
C++ you've done it again!

Dazza_Doo
Автор

My dear Bro,
I am delighted to claim that i have today completed your 60 videos long tutorial course on C++.
I also have a suggestion for you if you don't mind. Why don't you add a certification to your courses? I mean, your contents are great. Learners like me wants to get certified. Please take this request into consideration

manipurihunabopa
Автор

your videos are really helpful for me, thanks

vutuan
Автор

was this video rereleased or something?? It says it was released an hour ago but there are already comments from a year back???

ghotifish
Автор

nice to meet u guys here, pro coders.

ĐàmMinh-xc
Автор

Ultimate bro 💪🏽
Thanks a tonne your videos have been helpful
Now wishing you made videos related to all courses I'm taking ie my introduction to computer engineering course, logism ain't quite making sense to me

leomabuku