I had a constructor in my AB.h file:
class AB{ private: int i; public: AB:i(0){}//constructor ~AB:i(0){} // destructor virtual void methodA(unsigned int value)=0;}; The compiler said that:
class AB has virtual functions but non-virtual destructor
AB.h: In destructor ‘AB::~AB()’:
AC.h: error: only constructors take base initializers
if I use the ~AB(); destructor, it said that i have virtual functions but i didn't have destructor, where did I misunderstand? Thankyou