主观

#include ﹤iostream.h﹥

class A

{

public:

A( );

void Show( );

~A( );

private:

static int c;

};

int A:: c=O;

A:: A( )

{

cout﹤﹤"constructor."﹤﹤endl;

c +=10;

}

void A:: Show( )

{

cout﹤﹤"c="﹤﹤c﹤﹤endl;

}

A:: ~A( )

{

cout﹤﹤"destrucator."﹤﹤endl;

}

void main( )

{

A a, b;

a.Show( );

b.Show( );

}

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

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服