04-15-2013, 02:55 PM
|
#50
|
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Teach me CS stuff for interviews
So I could say "Animal* kitty = new Cat()" but what I am saying is that why couldn't I just do "Cat kitty = new Cat()" where Cat inherits Animal, and then when I call kitty.make_sound(), it calls the Animal's make_sound() function using the data attributes of the Cat() object?
|
|
|