下面程序段中,说法正确的是( )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-03 13:44:51