• 2022-07-28
    下面最能体现组合关系的是:
    A: class B { public: void Func(A* pa); };
    B: class B { A* mpA; };
    C: class B { public: B(A* pa):mpA(pa){ } private: A * mpA; };
    D: class B { public: B( ):mpA(nullptr){ } ~B( ){ } bool CreateA(int n) { mpA=new A(n); } bool KillA( ) { delete mpA; } private: A * mpA; };