#include <iostream>
struct Base
{
Base() { std::cout << typeid(*this).name() << std::endl; }
virtual ~Base() { std::cout << "~" << typeid(*this).name() << std::endl; }
void Init() const { std::cout << typeid(*this).name() << std::endl; }
};
struct Derived : public Base
{
};
int main()
{
Derived d;
d.Init();
return 0;
}