class Base{
Base();
~Base();
void doSomrthing();
}
Class MyCLass : public Base{
std::string name;
MyCLass();
~MyCLass();
void init();
}
MyCLass::MyCLass()
{
init(); //runtime error occurs with this line
}
void MyCLass::init()
{
name = "MyClass";
doSomrthing();
}
I am having a trouble on calling child class' contructor. What is wrong with this?