3

If a class is only used as a base class to derive other classes and therefore has only pure virtual member functions (no data members) - does it get an implicitly declared constructor?

    class Object {
    public:
     virtual void show(std::ostream&) = 0;
     virtual ~Object();
    };
TonySalimi
  • 8,257
  • 4
  • 33
  • 62
  • The Q is not a duplicate of the one that is marked. This Q specifically askes about the existance of a default constructor for abstract classes without any members, that is not answered in that Q. – TonySalimi Mar 30 '19 at 21:09
  • @hsalimi It doesn't make any difference. The rules are the same for all classes. There are no special cases. – user207421 Mar 30 '19 at 22:47

0 Answers0