0
I don't understand a thingđ
I can't understand the nature of inheritance Code: https://sololearn.com/compiler-playground/cpsfaJE7ZAGo/?ref=app
1 Answer
+ 4
Intermediate Depression you had given two times base* so it gave the same result. Instead you can write one base and another derived and you can understand the difference from the base class and derived class. The concept used here is pointers by pointing towards the object's address so to get the output of the function here it is pointed to the object and its function quack to print inside the quack function.