3、下面程序段中,说法正确的是() class location{ public : int GetX(); }; class rectangle:private location { public: int GetW(); };

A.类rectangle的私有派生类是location B.类rectangle中的public成员在类 location中是私有的 C.类location中的public成员在类 rectangle中是不可访问的 D.viod f() { Rectangle r; int X=r .GetX(); } 其中int X = r .GetX();是非法语句

时间:2024-04-29 17:40:22

相似题目