Forgive my ignorance, but is there any difference between Derived classes 1 & 2?
Since MyFunction() is already defined as a virtual function in the base class,
is it necessary to use the virtual keyword in the derived class?
Or is the only reason to use the virtual keyword in the derived class is to make
it more apparent to the programmer that MyFunction() is indeed a virtual function?
Used for the sake of clarity?
class Base {
public:
virtual void MyFunction();
};
class Derived1 : public Base {
public:
void MyFunction();
};
class Derived2 : public Base {
public:
virtual void MyFunction();
};