what is wrong with the virtual destructor in my codes?


newchannel.cpp: In destructor ‘virtual NewChannel::~NewChannel()’:
newchannel.cpp:45: error: no matching function for call to ‘NewChannel::~NewChannel()’
channel.h:44: note: candidates are: virtual Channel::~Channel()


1
2
//channel.h
virtual ~Channel();


1
2
3
4
5
6
7
//newchannel.h
class NewChannel:public Channel
{
...
~NewChannel();
...
}


1
2
3
4
5
//newchannel.cpp
NewChannel::~NewChannel(){
    Channel::~Channel();
    ...
    } 

Um, you don't call destructors yourself. That's done automatically by the compiler.
Topic archived. No new replies allowed.