0

I have a question about the pure virtual functions in c++:

// shape.h
class Shape
{
public:
   virtual void SetName() = 0;  
};

// round.h
#include "shape.h"
class Round: public Shape
{
   void SetName();
};

class Round inherits class Shape, SetName in base class Shape is virtual, and then in derived class Round define the SetName without virtual keyword, is this SetName function inherited from base class Shape and it is still virtual?

ratzip
  • 1,571
  • 7
  • 28
  • 53

0 Answers0