0
What is difference between REDEFINING and OVERRIDING in C++?
I am confused about the differences between redefining and overriding functions in derived classes. Please explain simply in your own words!
1 Réponse
+ 3
Overriding: The method in the ancestor class is virtual. A new implementation overrides the virtual one.
Redefining: The method in the ancestor class isn't virtual. Therefore the compiler has to choose which method gets used at compiletime. You should avoid this.