I want to create an abstract class in C ++ with one, but with some default implementation. so that every class that inherits it will have default behavior, but you cannot create an instance of the base class. but if I mark foo as pure virtual, I cannot add an implementation to it.
class Base { public: virtual void foo() =0;
My solution was to not have it as pure virtual, and just hide the constructor. I am wondering if it is possible to mark the class as clean, but still have some implementation?
source share