I don't get polimorphism. You have pointer "character* me" but it points to the adress in memory that contains "new player()"? What instance of character class is that "new player()" releted with? How do I add npcs then? Shouldn't you declare some "character me" or "character mob" before pointing to it? And you didn't say WHY you can't use me.getName() but me->getName() instead with pointers. I thought I understand pointers but now I feel like someone have to draw me an explaination.
Do you have the full code somewhere, I'm missing things.
DanHerdegen 3 years ago
I don't believe I still have this code, but the video seem clear enough to me. What are you missing?
ryutenchi 3 years ago
I don't get polimorphism. You have pointer "character* me" but it points to the adress in memory that contains "new player()"? What instance of character class is that "new player()" releted with? How do I add npcs then? Shouldn't you declare some "character me" or "character mob" before pointing to it? And you didn't say WHY you can't use me.getName() but me->getName() instead with pointers. I thought I understand pointers but now I feel like someone have to draw me an explaination.
Cheers.
cgofme 3 years ago
I finally understand it :). Ignore my last comment.
cgofme 3 years ago
buy new microphone mate. Thanks
valslovak 3 years ago
already have, was there anything you couldn't understand that you would like me to clarify?^^
ryutenchi 3 years ago
Yes, 0:00 through 1:00
mattfamilyguy 2 years ago
hey great stuff hurry up with the next one :)
omutomata 4 years ago 6