class a { public: class b * c; a (); void SomeFunc(); }; a::a() { c = new b(); }; void a::SomeFunc() { c->DoSomething(); };