发布时间:2012-12-18 22:06:29
#include <iostream>using namespace std;template <class T>T add(T x,T y){ T z; z=x+y; return z;
}int main(){ cout<<add(10,20)<<endl; cout<<add(12.3,45.6)<<endl; cout<<add("abc","def")<<endl; return 0;}......【阅读全文】
阅读(1283) | 评论(0) | 转发(1)