D
desktop
On this page:
http://www.eptacom.net/pubblicazioni/pub_eng/mdisp.html
Shape specify the virtual function:
virtual double Intersect( const Shape& s) = 0;
then the derived class Circle also specify:
virtual double Intersect( const Shape& s) = 0;
Why does Circle use the keyword "virtual"?
I have read that if a base class declares a function "fun" as virtual
all derived classes inherits this virtual function and does not need to
use the keyword "virtual" in their declarations.
http://www.eptacom.net/pubblicazioni/pub_eng/mdisp.html
Shape specify the virtual function:
virtual double Intersect( const Shape& s) = 0;
then the derived class Circle also specify:
virtual double Intersect( const Shape& s) = 0;
Why does Circle use the keyword "virtual"?
I have read that if a base class declares a function "fun" as virtual
all derived classes inherits this virtual function and does not need to
use the keyword "virtual" in their declarations.