A30386. 关于以下C++代码,( )行代码会引起编译错误。#include <iostream>using namespace std;class Base { private: int a; protected: int b; public: int c; Base() : a(1), b(2), c(3) { }};class Derived : public Base { public: void …
单选题
困难
知识点
题目描述
关于以下C++代码,( )行代码会引起编译错误。
#include <iostream>
using namespace std;
class Base {
private:
int a;
protected:
int b;
public:
int c;
Base() : a(1), b(2), c(3) {
}
};
class Derived : public Base {
public:
void show() {
cout << a << endl;
// Line 1
cout << b << endl;
// Line 2
cout << c << endl;
// Line 3
}
};
选项(单选)
答案解析
详细答案解析为会员权益,按每日次数查看。
开通 / 升级会员
上一题
下一题