主观

在下面程序横线处填上适当内容,使程序执行结果为:  n=30  程序如下:  #include ﹤iostream.h﹥

template ﹤class T﹥

class Test

{

T n;

public:

Test( ){ }

Test(T i){n=i;}

Test﹤T﹥_________(const Test﹤T﹥&s)

{

static Test﹤T﹥temp;

_________;

return temp;

}

void disp( ){cout﹤﹤"n="﹤﹤n﹤﹤endl;}

} ;

void main( )

{

Test ﹤int﹥t1(4),t2(5),t3;

t3=t1+t2;

t3.disp( );

}

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

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服