In the normal case, an overridden virtual function in itself is virtual. It doesn't matter if the function of the parent class was virtual because you used the keyword virtualor because its own parent was virtual.
Beware when you "hide" one function with a different name, but with a different signature. This feature is not virtual!
class Foo
{
public:
virtual void a()=0;
};
class Bar:public Foo
{
public:
void a();
};
class Baz1 : public Bar
{
public:
void a();
};
class Baz2 : public Bar
{
public:
void a(int);
};
source
share