I am still a beginner in C++:
Lets say i need to derive a class D from a base class B. And I have a need to override B's function called vulnerable()
There are two ways I can do it:
1. Normal override - Just re-define the function in class D
2. Virtual Function Override - Delcare it as virtual in B and then override in B
What is the advantage of one over the other?
Lets say i need to derive a class D from a base class B. And I have a need to override B's function called vulnerable()
There are two ways I can do it:
1. Normal override - Just re-define the function in class D
2. Virtual Function Override - Delcare it as virtual in B and then override in B
What is the advantage of one over the other?
Comment