Fcode_template

system("pause");


#include <iostream>
using namespace std;

 


#include <iostream >
using namespace std;

template <typename T>

T Add2Value(T a, T b)
{

T result;
result = a+b;
return result;
}

int main()
{

int i =11, j=645,k;

float l=2.718,m = 34.23 , n;


k = Add2Value (i , j);
n = Add2Value (l , m);
cout<< k <<endl;
cout<< n <<endl;

return 0;


}

posted @ 2022-12-19 12:06  cnetsa  阅读(10)  评论(0编辑  收藏  举报