1

If I have an AbstractClass with a "virtual void Method()=0". What is the difference if a DerivedClass defines the implementation as "virtual void Method() { }" or simply "void Method() { }" ?

templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065
memRistor
  • 101
  • 1
  • 7

1 Answers1

2

There is no difference. It's just for clarity.

Any method defined as virtual in a base class, is also virtual in the classes which inherit from it, regardless whether it's declared like that or not.

memRistor
  • 101
  • 1
  • 7