class B { public: B(); ~B(); int i; }; class AA { B b; public: AA(); ~AA(); int i; };