单选题
C++
题号 #2255255
可以用P.a的形式访问派生类对象P的基类成员a,其中a是( )。
参考答案
D
答案解析
D。【解析】只有公有继承的公有成员才能被派生类的对象直接访问,其他的情况都会因为访问权限问题产生错误。
你可能感兴趣的试题
A.print();
B.print();
}
}
C.11B.12
D.21D.22
A.cin.get(str,strlen(str));
B.cin.getline(str,strlen(str));
C.cin>>str;
D.cin.read(str,strlen(str));