#include class foo { int x; public: foo(int _x):x(_x) {} ~foo() { cout << "I am destroyed: " << x <