#include #include #include class A { public: A() { std::cout << "Class A Created\n"; } virtual ~A() { std::cout << "Class A Destroyed\n"; } }; class B { public: B() { std::cout << "Class B Created\n"; } ~B() { std::cout << "Class B Destroyed\n"; } }; class C : public A { B b{}; public: C() { std::cout << "Class C Created\n"; } virtual ~C() { std::cout << "Class C Destroyed\n"; } }; int main() { A v{}; B w{}; C x{}; return 0; }