destructor in C++
<p>I had a constructor in my AB.h file:</p>

<pre><code>class AB{
private: int i;
public:
AB:i(0){}//constructor
~AB:i(0){} // destructor
virtual void methodA(unsigned int value)=0;};
</code></pre>

<p>The compiler said that:</p>

<p>class AB has virtual functions but non-virtual destructor<br/>
AB.h: In destructor ‘AB::~AB()’:<br/>
AC.h: error: only constructors take base initializers</p>

<p>if I use the ~AB(); destructor, it said that i have virtual functions but i didn't have destructor, where did I misunderstand? 
Thankyou</p>
