pure virtual function and abstract class
问题 I have the following classes, Base and Derived and when I compile the compiler complains that it cannot create an instance of DLog because it is abstract. Can someone tell me how I can fix this error? I'm guessing it's because not both pure virtual functions are not implemented in the Derived. class Logger { public: virtual void log(int debugLevel, char* fmt, ...) = 0; virtual void log(string logText, int debugLevel, string threadName = "") = 0; static Logger* defaultLogger() {return m