有如下程序:
#include<iostream>
using namespace std;
class Base
private:
void funl( )constcout<<"funl";
protected:
void fun2( )consttout<<"fun2";
public:
void fun3( )consteout<<"fun3";
;
class Derived:protected Base
public:
void fun4( )constcout<<"fun4";
;
int main( )
Derived obj;
obj.funl( ); //①
obj.fun2( ); //②
obj.fun3( ); //③
obj.fun4( ); //④
return 0;
其中有语法错误的语句是
题库:计算机等级考试
类型:最佳选择题
时间:2017-07-03 15:13:05
免费下载:《单项选择》Word试卷
有如下程序:
#include<iostream>
using namespace std;
class Base
private:
void funl( )constcout<<"funl";
protected:
void fun2( )consttout<<"fun2";
public:
void fun3( )consteout<<"fun3";
;
class Derived:protected Base
public:
void fun4( )constcout<<"fun4";
;
int main( )
Derived obj;
obj.funl( ); //①
obj.fun2( ); //②
obj.fun3( ); //③
obj.fun4( ); //④
return 0;
其中有语法错误的语句是
A.①②③④
B.①②③
C.②③④
D.①④
本题关键词:程序,有序镜检,工程施工程序,复苏程序,工作程序,建设程序,程序变更,程序冲突,点火程序,生产程序;