题目内容
有如下程序:#includeusing namespace std;class Base{private:void fun1()const{ cout<<"fun1";}protected:void fun2()const{ cout<<"fun2";}public:void fun3()const{ cout<<"fun3";}};class Derived:protected Base{public:void fun4()const{ cout<<"fun4";}};int main(void){Derived obj;obj.fun1(); // ①obj.fun2(); // ②obj.fun3(); // ③obj.fun4(); // ④system("pause");return 0;}其中有语法错误的语句是( )。
查看答案
搜索结果不匹配?点我反馈
更多问题