下列Visual C++程序的运行结果是________ #included iostream.h> #includedmath.h> template<class T> class TAdd T x y; public: TAdd(T a,T b){x

admin2016-01-31  19

问题 下列Visual C++程序的运行结果是________
#included iostream.h>
#includedmath.h>
template<class T>
class TAdd
T x  y;
public:
TAdd(T a,T b){x=a,y=b;)
T add(){return x+y;}
void main()
TAdd<int>A(6,10);
TAdd<double>B(6.6,3.3);
cout<<“s1=”<cout<<“s2=”<
选项

答案s1=16;s2=9.9。

解析
转载请注明原文地址:https://jikaoti.com/ti/EbF9FFFM
0

最新回复(0)