单选题 C++
题号 #2250915

下列代码段声明了3个类:
classPerson{);
classStudent:publicPerson{};
classUndergraduate:Student{);
下列关于这些类之间关系的描述中,错误的是(  )。

进入在线模考

参考答案

B

答案解析

B。【解析】类Undergraduate从类Student私有继承,继承方式缺省则默认是private。

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考