单项选择题

有如下程序: #inc1ude <iostream> using namespace std; c1ass Base { private: void funl()const{cout<<"funl";} protected: void fun2()const{cout<<"fun2";} public: void fun3()const{cout<<"fun3";} }; c1ass Derived: protected Base { public: void fun4()const{cout<<"fun4";} }; int main() { Derived obj; obj.funl(); //① obj.fun2(); //② obj .fun3(); //③ obj.fun4(); //④ retum (); } 其中有语法错误的语句是( )。

A.①②③④
B.①②③
C.②③④
D.①④
题目列表

你可能感兴趣的试题

微信扫码免费搜题