Buckys C++ Programming Tutorials - 56 - virtual Functions

  Рет қаралды 378,135

thenewboston

thenewboston

Күн бұрын

Пікірлер: 378
@TheChronoTiger
@TheChronoTiger 4 жыл бұрын
madman uploaded in 2011 and still saves lives to this day... mvp
@saumyasingh7670
@saumyasingh7670 3 жыл бұрын
So true💯💯
@pawanchouhan1561
@pawanchouhan1561 4 ай бұрын
Simple and to the point explanation.
@secretmaster5
@secretmaster5 4 жыл бұрын
Entertaining, informative, quick to the point and easy to understand. Everything my teachers aren't. Even 10 years later, low sound and all, these videos are better than a full university course. Thanks Bucky, you are a saint.
@SolANDSixela
@SolANDSixela 5 жыл бұрын
This is the mark where I have everything for my class. I would like to thank you Bucky for making these videos. You have been the most clear programmer and teacher for me. Have a blessed day!
@matiasssssssss
@matiasssssssss 4 жыл бұрын
you should check out jacob sorber
@lovelyshimly8261
@lovelyshimly8261 3 жыл бұрын
@@matiasssssssss what does jacob sorber do? I checked his page and there is nothing about c++..
@matiasssssssss
@matiasssssssss 3 жыл бұрын
@@lovelyshimly8261 he does have plenty of c/c++ related videos. There are also vids where he explains something in general then shows some java/c/cpp code. He explains stuff so well in my opionion. Try searching a specific topic with his name afterwards like “linked lists jacob sorber”
@FatemaAbbasMoaiyadi
@FatemaAbbasMoaiyadi Жыл бұрын
I have been trying to understand what my college professor is teaching us in C++ for soo long. I understood this way better in just 10 minutes. Thank you.
@ste4lthles
@ste4lthles 2 жыл бұрын
Tutorial from 11y ago, has better quality, audio and content than most recent ones. Thanks for this.
@anfernny6278
@anfernny6278 3 жыл бұрын
This the best god damn tutorial. I was trying to understand this for 2 hours before reaching this video
@j33REN
@j33REN 7 жыл бұрын
Bucky you are awesome.
@ryugagod7140
@ryugagod7140 Ай бұрын
He really explained a lot better than my prof. So much more clearly while showing an application. Helped out a lot, thanks.
@leeonzo4535
@leeonzo4535 2 жыл бұрын
The first 2 lines in main are creating objects. Second 2 are connecting their addresses to some pointers Last 2 are running the function in each class (In main
@udk-tutorialsbyluke8434
@udk-tutorialsbyluke8434 11 жыл бұрын
Wow you are programming but stood at ground at same time to make us understand C++! Thanks and got my sub of course:)
@NatashasTemuFinds
@NatashasTemuFinds 7 жыл бұрын
360p and still readable :/
@TrojanLube69
@TrojanLube69 4 жыл бұрын
he is from the future.
@unknownguy2092
@unknownguy2092 4 жыл бұрын
@@TrojanLube69 hey do u remember me bro?
@jose.a.a.a
@jose.a.a.a 4 жыл бұрын
@@unknownguy2092 No.
@jjsdsounds
@jjsdsounds Жыл бұрын
"whoa backslashes" - Bucky love this dude
@joaquintorres834
@joaquintorres834 3 жыл бұрын
You are a legend, Bucky! Take care and stay safe. Love from Spain.
@tek87
@tek87 11 жыл бұрын
The main difference is where it lives in memory. The "non pointer version" lives on the stack, meaning it will be invalid once the function returns, while the "pointer version" lives on the heap, which means it will be alive and well until somebody calls delete on it. In general it is considered best practice to put objects on the stack whenever possible, and only on the heap when needed.
@BurninVinyl
@BurninVinyl 7 ай бұрын
13 years later Bucky still the best teacher. To make it short: In C++, when using polymorphism, you can't directly use functions from derived classes in the base class, unless the base class has a virtual function, because the base class doesn't know about the derived classes' functions.
@mhazani
@mhazani 8 жыл бұрын
SO simple! I've been trying to grok this for a while and your 9 minutes and 18 seconds just drove it home. Thank you, Bucky!
@Jaredvotesforpedro
@Jaredvotesforpedro 2 жыл бұрын
My man just explained this better in under 10 minutes than my prof did in over 2 hours.
@averyali95
@averyali95 10 жыл бұрын
You made this topic and polymorphism so much easier than what my professor taught me, i thank you and keep it up. You were very clear and helpful
@abrarmahi
@abrarmahi 4 жыл бұрын
2020 and this man is still saving my grades
@kevinallison75
@kevinallison75 7 жыл бұрын
Bucky's videos are a great way to clarify certain concepts. I really am grateful i found this channel
@dzuzr
@dzuzr 6 жыл бұрын
This is so legit. Really simple to understand. For anyone new coming here you can also declare it like this to get initialize and assign the pointer in one liners: Enemy *pNinja = new Ninja; Enemy *pMonster = new Monster;
@leavedrakealone1801
@leavedrakealone1801 5 жыл бұрын
But I think then you will have to delete the pointer as well.
@rjgonzalez8108
@rjgonzalez8108 3 жыл бұрын
@@leavedrakealone1801 True! The new keyword allocates memory from the heap so it needs to be deallocated using the delete keyword.
@WSEize
@WSEize 11 жыл бұрын
"mponster attack"
@TrojanLube69
@TrojanLube69 4 жыл бұрын
he does it on purpose, always. He is very clever.
@sathvikreddy5799
@sathvikreddy5799 4 жыл бұрын
@@TrojanLube69 I don't think so , 'cause p is next to o in the keyboard, a typo error
@frankalfaro6124
@frankalfaro6124 4 жыл бұрын
Now that's a good 2020 way of thinking since there's literally a game coded for an imposter to attack that's very popular this year.
@stefano8880
@stefano8880 7 жыл бұрын
holy crap. It took only 10 minutes for you to make us understand virtual and it is better than my professor explaining it.
@djdancealone3419
@djdancealone3419 7 жыл бұрын
Bucky, You explain concepts so well. Truly appreciate your work.
@michal234486
@michal234486 8 жыл бұрын
I think he could have accessed the setAttackPower from the level of both derived classes, so n.setAttackPower(14) because setAttackPower is public. Is that correct?
@thegamingruler1996
@thegamingruler1996 12 жыл бұрын
im soo excited coming to the end of the series and starting the GUI tutorials shivers down my body
@SirRobbStarkGamin
@SirRobbStarkGamin 10 жыл бұрын
So in short, we use virtual to tell the parent class before it start outputting to check the child class for similar function with same parameter, and if it finds it, it would output the function in child and if it cannot it'd out put the function in parent.
@syedwasay3087
@syedwasay3087 6 жыл бұрын
exactly but needs to done through pointers :D
@RivenbladeS
@RivenbladeS 8 жыл бұрын
"woohh easy backslashes" hahhaha
@karmaindustrie
@karmaindustrie 5 жыл бұрын
back off backslashes!
@tuanvu5161
@tuanvu5161 5 жыл бұрын
lol just thought that I'm the only one laughing at that sentence :)
@notzuhriashraaf4912
@notzuhriashraaf4912 4 жыл бұрын
I laughed at it too!
@heavestern
@heavestern 11 жыл бұрын
this is i love youtube there is always someone can explain a thing best way you can understand ty man was much easier this way
@menglixia6470
@menglixia6470 5 жыл бұрын
hmmm.. enemy1.attack() should probably be anemy1->attack() around 1:10, as enemy1 is a pointer?
@Vorbis5
@Vorbis5 13 жыл бұрын
It blows my mind how bucky can teach weird concepts like noone else.
@DjCastoo
@DjCastoo 10 жыл бұрын
It's good to have examples, my programming teacher gives us theory without any examples wich makes it very hard to understand we you need to put it to practice ! Thank you so much, very clear and simple !
@kousoulides
@kousoulides 11 жыл бұрын
yes it works both ways in this example, but this is just to show you what is polymorphism in the most basic way possible, imagine if you had a virtual function than did something: virtual void f(int n) { std::cout
@AnderzSwe94
@AnderzSwe94 13 жыл бұрын
@thomastancksVideos the -> operator is used for pointers to reach the members of the object it is pointing at
@samidessuky5151
@samidessuky5151 3 жыл бұрын
2021 and still saving lives. You a real one Bucky :')
@Alfredo5883
@Alfredo5883 3 жыл бұрын
Yeah true. Best explanation of Polymorphism on YT
@thespacedan.
@thespacedan. 2 жыл бұрын
its a great world where i can find a better teacher and learning resource for free on youtube rather than a university that I pay a hefty amount to
@BelievinSP
@BelievinSP 8 жыл бұрын
thanks! I love this "explain it to me like I'm 5", video. It's short and sweet
@scottpowell5205
@scottpowell5205 10 жыл бұрын
Ciuculete Cosmin - if you have just one or two objects like "m" and "n" - there would be no reason to. But what if you have 1000 objects stored in an array - and they are all different types. If I wanted to loop over all 1000 objects and have each of them attack, lot simpler to put all the different types of monsters into a single array of enemies. Or maybe I have an indeterminate number of objects - like theres a randomness where every 5 to 10 seconds a new enemy is spawned (using "new" to create a new object). If I have a dynamic number of objects, you need polymorphism to be able to call shared methods on all of them.
@Kytuzian
@Kytuzian 13 жыл бұрын
Whenever you say you're going to shut up, you never do. I liked it anyway.
@BirdPEE
@BirdPEE 11 жыл бұрын
Thank you for your clear and entertaining explanations Bucky! I was so confused in class.
@bsgamer5069
@bsgamer5069 4 жыл бұрын
It’s 2021. But your explanation rocks
@gregkan3964
@gregkan3964 7 жыл бұрын
polymorpihsm comcept is quite easy to understand and the example used is very good, what confuses me is, do we really have to use pointers to have access to attack function ??
@roma.senatosu
@roma.senatosu 4 жыл бұрын
I really like your tutorials. You are explaining very well and of course you make us smile 😊
@shubhankarpotdar5458
@shubhankarpotdar5458 11 жыл бұрын
Dude...ur awsum!!! You have explained it in real simple language...its been extremely helpfull..thanks a lot!!!
@DimitrisHD
@DimitrisHD 8 жыл бұрын
Dude, i love you.
@majedalghanmi7429
@majedalghanmi7429 7 жыл бұрын
thanks allot : you a best teacher for c++
@pepsico815
@pepsico815 8 жыл бұрын
Why doesn't he just do n.attack(); ?
@odbodbo
@odbodbo 8 жыл бұрын
I think it is just to show you that it can be called from the base class. Imagine that you'd have a list/array of enemies but you don't know if each element is a Ninja or a Monster. Then you can still just say something like: enemies[i]->attack();
@gamedevnow7551
@gamedevnow7551 8 жыл бұрын
Yes, I a agree with odbodbo, Imagine you have 30 types of pokemons, and each type have an "attack" method which differs a little bit from the other type, say pokemon from water splashes water, from fire spits fire and so on. So, instead of saying, Poken of fire attack fire, pokemon of water attack with water.... you just say, POKEMONS ATTACK, and each type will perform the attack according to its specialization. It is useful when we have different types but under a collection which derived from a common base class, and we can treat them as "equal" due to the fact that they come from the same ancestor but each will perform a different attack.
@dzmitryk9658
@dzmitryk9658 7 жыл бұрын
I'm so happy I've looked at this thread :D Thank you guys!
@mazhartejani
@mazhartejani 7 жыл бұрын
Thank you so much for the brief explaination, it helped me alot, to understand this concept.
@bouzie8000
@bouzie8000 7 жыл бұрын
perfect. I was confused as well
@ParthPatel-yj6fc
@ParthPatel-yj6fc 8 жыл бұрын
Why is it possible to assign an Enemy class object pointer to the address of a 'Ninja' class object 'Enemy *enemy1 = &n'?. The Ninja class may contain more information than the 'attack' method; in that case would it still be possible to use 'Enemy *enemy1 = &n'?
@MrGamenewb
@MrGamenewb 12 жыл бұрын
You are an awesome teacher! But i got one question. When the destructor of the classes Monster and Ninja are called and then there would be also a need to call the destructor for the class Enemy, wouldn't it? However i am not quite sure about this, but i think you need to make a virtual Destructor so that the class get destroyed properly, otherwise you get a Memory Leak, or do i mix up things, can you help me?
@fuondjingamietee4884
@fuondjingamietee4884 5 жыл бұрын
ahaha "public enemy" like this if you peeped too
@skolanbrinner
@skolanbrinner 12 жыл бұрын
Indeed, KZbin really needs better c++ Windows API tutorials
@realm087
@realm087 13 жыл бұрын
@Cezarijus if you wanted to create an array of pointers, let's say, a list of different enemies with monsters, ninjas and such things you would need a virtual function from the base class enemy to be able to call the attack function from the enemy elements in that list. If you just had the attack functions in the derived classes your program woudn't be able to call it from a pointer to a base class. That's the greatest value of virtual functions.
@paulmouton6765
@paulmouton6765 6 жыл бұрын
I am currently studying Computer Science at a South African university where the lecturors can't explain anything in class. The whole subject is basically self-study for us. Your video's just saved me from failing this subject. Thanks SO much
@1mol831
@1mol831 2 жыл бұрын
That’s harsh. Feels bad for solitary though
@ciuculetecosmin4380
@ciuculetecosmin4380 10 жыл бұрын
ok...but why wouldn't you just n.attack(); and m.attack(); and call the functions respective to the ninja/monster itself instead of calling them from an enemy that points to a ninja/monster?
@nerickamkech2730
@nerickamkech2730 4 жыл бұрын
Because it is useful for other purposes For example these are Enemies Ninja - has attack function Monster - has attack function Then we will add Slime let's say it doesn't attack Slime - No function Okay now For example you want to set rules - If you fight a non hostile enemy like slime, you want the user win in first turn so our function is I'm going to make a variable that checks if that class has it function bool friendly; If 1 = has no attack function If 0= has an attack function Void checkenemy(Enemy *pEnemy){ if(*pEnemy.friendly == 0) //Execute the attack which the slime has no attack function *pEnemy.attack(); Else //win the User } We can use that in method functions or statements that execute the specific function that owns by the class that have it only This is the example I taught why we need to use that
@robertneville777
@robertneville777 11 жыл бұрын
Great explanation on virtual functions! Thanks!
@seigeengine
@seigeengine 12 жыл бұрын
Welcome to tutorials that expect you have a clue what you're doing. You'll get there some day, champ!
@masudzaman8841
@masudzaman8841 4 жыл бұрын
Why instantiate an Enemy object when I can use the dot operator to set the attack power? such as n.setAttackPower(29)
@cmopix
@cmopix 13 жыл бұрын
@irtifakhan17 you can do this in this specific example, but what if you don't know whether you have a ninja or a monster or another type of monster. Let's say you enter a room and some randomly generated different types of monsters appear, through polymorphism all those specific monsters know how they're supposed to attack.
@Impulse_Photography
@Impulse_Photography 5 жыл бұрын
Does this (virtual functions) work with ' Composition' also or is it just for ' Inheritance? '
@Invisibleman39
@Invisibleman39 8 жыл бұрын
...thanks allot for good tutorials....i have a question...why you have not created constructor inside classes....isnt it necessary to have constructor??!
@bartoszantczak1613
@bartoszantczak1613 8 жыл бұрын
Every class has a default constructor, which means it isn't necessary to write one. Writing a constructor overloads the default constructor and allows you to customize how your class is instantiated (compared to the default values set from the default constructor).
@Invisibleman39
@Invisibleman39 8 жыл бұрын
Thanks.....
@janisl.6982
@janisl.6982 10 жыл бұрын
Mponster - monster what likes listening MP3 and attacks you with bad qualitaty music :D
@shamanik1320
@shamanik1320 6 жыл бұрын
So adding override is just for clarity but doesnt do anything itself, right?
@nasriwidaatalla6711
@nasriwidaatalla6711 4 жыл бұрын
Great way of delivering information..
@harilalmn
@harilalmn 8 жыл бұрын
Bucky, I tried it by calling the setAttackPower method directly from Ninja n and Monster m and it worked well. Then why do we use the enemy1 and enemy2 pointers to call the method? Kindly see the code below; Ninja n; Monster m; //Enemy *enemy1 = &n; //Enemy *enemy2 = &m; //enemy1->setAttackPower(25); //enemy2->setAttackPower(100); n.setAttackPower(25); m.setAttackPower(100); n.attack(); m.attack();
@harilalmn
@harilalmn 8 жыл бұрын
Thankyou...!!!
@shubh_chaudhri
@shubh_chaudhri 5 жыл бұрын
tutorial for generations to come...
@PalaRossonero
@PalaRossonero 3 жыл бұрын
Man , you're so good at explaining!, Thank you so much!
@kostastsigkounis8784
@kostastsigkounis8784 11 жыл бұрын
Very helpful! Thanks thenewboston!
@kylebb1901
@kylebb1901 6 ай бұрын
This is explained so so so well!
@aka0989
@aka0989 6 жыл бұрын
tthen why shouldn't we just use the attack method of the object m or n that we created it directly ? still cant get the point of virtual func ...
@scotfsh5014
@scotfsh5014 2 жыл бұрын
love this tutorial so much, thanks Bucky.
@omidheidari6711
@omidheidari6711 6 жыл бұрын
this guy is a good teacher and he is so funny, easy backslashes :)))
@jkracing
@jkracing 8 жыл бұрын
hey bucky have you created any apps or games that are in the app store?
@NikorasuChan
@NikorasuChan 12 жыл бұрын
Halfway through the tutorial series, its tea time break! XD (and its still morning...)
@krupt5995
@krupt5995 6 жыл бұрын
yes but in separate class files the other classes are unaware of the Enemy one so how is this possible?
@moreorless6523
@moreorless6523 8 жыл бұрын
just a correction to the video: C++ doesn't have virtual variables.
@Mark131292
@Mark131292 10 жыл бұрын
You're absolutely amazing. Cheers from Portugal ;)
@midas2570
@midas2570 6 жыл бұрын
so last video you talked and showed us polymorphism, but in this video you say "In order to have ploymorphism, you need this virtual stuff." but there was no virtual stuff which you talked about polymorphism. So which one is polymorphism?
@karmaindustrie
@karmaindustrie 5 жыл бұрын
5:02 what is that word "mice" ? ... "i mice'le just code.. " / "i mussle just code... " i hear that a lot from another guy (AJ Miller) but i never figuret out how to look it up because i can not write it. ... missal? ...moical? The context always sounds like "i RATHER do xy"
@P4rkerMann
@P4rkerMann 5 жыл бұрын
"I might as well just code it" he just said it fast.
@karmaindustrie
@karmaindustrie 5 жыл бұрын
@@P4rkerMann Oh my goodness, thank you so much I was lookin for that mystery for ages!
@P4rkerMann
@P4rkerMann 5 жыл бұрын
Karmaindustrie you’re welcome! :)
@DJayDiamond
@DJayDiamond 4 жыл бұрын
If you are going to have different function definitions for each type of enemy then why use polymorphism at all? Just to avoid having to type the different names? I'm guessing it's just a convenience thing. Like for basic programs you can probably get away without using polymorphism at all right?
@sihonglu5687
@sihonglu5687 12 жыл бұрын
umm i would like to ask what if use Enemy enemy1=n; and Enemy enemy2=m; I tried that and got some random gibberish in return.... is it because by doing so, you are making a copy of the object n and m, and assigning it to the enemy objects and by printing out the n.attack(), and m.attack() the value of attack power is not changed in them?
@JoeDaHond
@JoeDaHond 12 жыл бұрын
Why whenever I use inheritance of classes it shows up as an error? It says: error: new types cannot be defined in a return type note: (perhaps a semicolon is missing after the definition of 'Monster') error: two or more data types in declaration of 'main'
@shmuelbachar3225
@shmuelbachar3225 7 жыл бұрын
i have aquestion! if i want to add to virtual setattackpower number and than to show the number when i call void attack how did i do that ?
@imcool1347
@imcool1347 13 жыл бұрын
i honestly love you bucky
@davidwesh4123
@davidwesh4123 Жыл бұрын
Great an straight to the point.
@seekergaming2817
@seekergaming2817 4 жыл бұрын
i dont understand the difference between tutorial 55 en 56... only difference i see is that buckey didnt give a value to attack which spared him 2 lines but the rest was pretty much the same... can someone explain pls :/
@agnesakne4409
@agnesakne4409 7 жыл бұрын
I remember getting compiler error after using the virtual specifier in the method definition in .cpp file, this specifier is only to be used in the declaration right?
@daxola1
@daxola1 9 жыл бұрын
Why don't they teach us this a lot more heavily in CS? This is very useful. Thank you.
@holybubbles
@holybubbles 11 жыл бұрын
What exactly is the difference between what you did in this tutorial and the previous one?
@martinsvk17
@martinsvk17 11 жыл бұрын
For example you can have 1000 different types of enemies and you can still invoke attack from all of theme just by using a for each loop like for example in java u make for Enemy e : enemyList { e.attack() };
@3zombie81
@3zombie81 Жыл бұрын
I forgot what virtual does, now I get it.
@iqrapervaiz8955
@iqrapervaiz8955 7 жыл бұрын
Derived class can only initialize members of base class using overloaded constructors Derived class can not initialize the public data member of base class using member initialization list can you please explain this concept.
@hopa-ys2bc
@hopa-ys2bc 8 жыл бұрын
I think u can just use setAttackPower to derived objects n and m without switching twice with m.enemy::setAttackPower()... Polymorphism is not needed in that example i guess
@lijasssss
@lijasssss 13 жыл бұрын
a value of type "type" cannot be used to initialize an entity of type "type" if i get this error, what do i do ?
@janicejackson605
@janicejackson605 7 жыл бұрын
Hi, love ur vids, I have a question tho... What the heck does line: Enemy *enemy1 = &n; acctually do??? I can't wrap my head around that...
@janicejackson605
@janicejackson605 7 жыл бұрын
Thanks for your answer! But isn't enemy1 an Enemy object already?
@92steamer
@92steamer 11 жыл бұрын
Why you are not my University professor ? ;( Thanks a lot,everything is much easier than I thought.
@RudeGuyGames
@RudeGuyGames 10 жыл бұрын
***** I think he died.
@jozestrozer
@jozestrozer 7 жыл бұрын
Nope
@mysticlunala8020
@mysticlunala8020 4 жыл бұрын
@@jozestrozer Still no. He just posted something on Reddit a month back. :))))))))
@cixin10x
@cixin10x 3 жыл бұрын
Captain America saved Bucky for a reason.
@asimshah1824
@asimshah1824 2 жыл бұрын
True dat😂
@usmanshahid4891
@usmanshahid4891 9 жыл бұрын
Okay so I've got a question. The guy here first declares a Ninja object: n and a monster object: m. He then declares two enemy pointer objects (enemy1 and enemy2) and assigns them each to n and m. Wouldn't it have made more sense to declare a ninja object: enemy1 and a monster object: enemy2 and used their respective attack functions thereby removing any use of the virtual functions. Don't get me wrong. I understand there are numerous ways to tackle a problem. But the thing is that I'm trying to think of scenarios where virtual functions are actually useful and I'm drawing a blank. :/
@juice12222
@juice12222 9 жыл бұрын
Usman Shahid I get what your saying, this is just an example as how virtual functions would work with pointers if needed to. 3 Reasons why you would use virtual functions/late binding. (1) when a program has a variable declared as a pointer to a base class object but which sometimes points to a derived class object.(this example).(2) When a variable is declared as a reference to a base class object but sometimes is a reference to a derived class object.(3)When a base class function calls a function that is defined in both the base class and derived class. I think you need an example of number 3 to really give you another example of why virtual functions would help.
@Rin-qj7zt
@Rin-qj7zt 9 жыл бұрын
+Usman Shahid try storing your ninja object and your monster object in the same array. it can't be done. to fix that, create an enemy array and use the method in the video. now you can store your ninja object and your monster object in the same array. Ninja n; Monster m; n.attack(); m.attack(); Ninja narray[2]= {n,m}; // this is invalid Monster marray[2]= {n,m};// this is invalid Enemy Earray1[2]={n,m}; // even this is invalid Enemy *enemy1 = &n; Enemy *enemy2=&m; Enemy *Earray2[2] = {enemy1,enemy2}; // this is valid. now we have an array that holds 2 different class objects. (well technically it holds the pointers to those class objects, but i digress) using the virtual function scenario taught in this video, the statement Earray2[1]->attack(); becomes valid. (though the syntax for that last one might be off because i've never used this method before. for example, i have no idea what the syntax is for storing pointers inside an array.)
@ramyapriya7257
@ramyapriya7257 9 жыл бұрын
Guys,Help me understand something. If it is called run time polymorphism,shouldn't the error be shown during run time?
@broochii
@broochii 7 жыл бұрын
amazing work bucky. thanks.
@colinhicks6607
@colinhicks6607 7 жыл бұрын
my biggest complaint with the last two videos was that even though he explained the how very well, he didn't really explain the why. Why use pointers to the monster and ninja objects (turns out efficiency). It makes sense now, but he never explicitly said it in the video he just showed us why its valid.
C++ Polymorphism and Virtual Member Functions [6]
12:13
Professor Hank Stalica
Рет қаралды 19 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Buckys C++ Programming Tutorials - 55 - Introduction to Polymorphism
10:00
My 2 Year Journey of Learning C, in 9 minutes
8:42
VoxelRifts
Рет қаралды 672 М.
Buckys C++ Programming Tutorials - 58 - function Templates
8:44
thenewboston
Рет қаралды 399 М.
Dynamic Binding (Polymorphism) With The Virtual Keyword | C++ Tutorial
9:57
Buckys C++ Programming Tutorials - 61 - Template Specializations
8:56
Every Programming Language Ever Explained in 15 Minutes
15:29
Flash Bytes
Рет қаралды 363 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 844 М.
Virtual Functions & Abstract Classes in C++ | C++ Programming Tutorials
15:12