主观

下面程序的运行结果如下:  20,22  60,22

在答题纸上填上缺少的部分。源程序如下:

#include ﹤iostream﹥

using namespace std;

class base

{

private:

const int a;

static const int b;

public:

base(int);

void Show( );

};

_________=22;

_________ : a(i){ } //初始化

void base:: Show( )

{ cout﹤﹤a﹤﹤","﹤﹤b﹤﹤endl; }

void main( )

{

base a1(20), a2(60);

a1.Show( );

a2.Show( );

}

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服