ParentType* A = new ChildType();
myMethod(*A);
…
void myMethod(ParentType& x);
void myMethod(ChildType& x);
If ChildType extends ParentType, which function gets called?
ParentType* A = new ChildType();
myMethod(*A);
…
void myMethod(ParentType& x);
void myMethod(ChildType& x);
If ChildType extends ParentType, which function gets called?
:: Copyright KIRUPA 2024 //--