#include using namespace std; struct MyClass { int x; MyClass(int i) { this->x = i; cout << "MyClass::MyClass(" << this->x << ")" << endl; } ~MyClass() { cout << "MyClass::~MyClass(" << this->x << ")" << endl; } }; int main() { MyClass a(10); { MyClass b(20); } MyClass * c = new MyClass(30); delete c; cout << "fine del programma" << endl; }