主观

下面程序实现数值、字符串的交换。

#include

#include

using namespace std;

template

void Swap(T&a,T&b)

{T temp;

temp=a;a=b;b=temp;

}

void main()

{int a=5,=9;

char s1[]="Hello",s2[]="hi";

Swap(a,b);

Swap(s1,s2);

cout<<"a="<

cout<<"s1="<

}

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

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服