问题
单项选择题
C++语言类体系中,不能被派生类继承的有( )。
A.转换函数
B.构造函数
C.虚函数
D.静态成员函数
答案
参考答案:B
解析:派生类对象的数据结构是由基类中说明的数据成员和派生类中说 明的数据成员共同构成,所以不能继承基类的构造函数,必须重新定义。
C++语言类体系中,不能被派生类继承的有( )。
A.转换函数
B.构造函数
C.虚函数
D.静态成员函数
参考答案:B
解析:派生类对象的数据结构是由基类中说明的数据成员和派生类中说 明的数据成员共同构成,所以不能继承基类的构造函数,必须重新定义。
完形填空。 | |||
Maybe you know a lot about the city you live in. You may even know some interesting facts about Earth, but 1 do you know about Mars? Will there be 2 there just like people on Earth? Mars is the fourth planet from the sun and it's the most like Earth, but it's much 3 than Earth because it's farther from the sun. It's also the only planet whose surface can be 4 from Earth. Mars is often called "the red planet" because the rocks on it have a dark 5 color. There are strong winds on Mars that can 6 dust into the hills. For many years, people have 7 Mars, They have sent instruments and robots there. Some of the robots got there, 8 most failed. NASA(美国国家宇航局) sent two robots to Mars two years ago. They wanted to 9 signs of water and life on Mars. Some day, humans will travel to Mars and have an even 10 look at our red neighbor. | |||
( )1. A. when ( )2. A. sound ( )3. A. hotter ( )4. A. seen ( )5. A. red ( )6. A. blow ( )7. A. lived on ( )8. A. but ( )9. A. leave ( )10. A. faster | B. what B. life B. colder B. wrote B. black B. look B. landed on B. and B. use B. farther | C. which C. air C. bigger C. heard C. white C. mix C. studied C. however C. find C. closer | D. how D. water D. smaller D. visited D. yellow D. fly D. written D. or D. give D. lower |