首页 > 其他分享 >Fcode_template

Fcode_template

时间:2022-12-19 12:11:52浏览次数:37  
标签:std return cout Add2Value Fcode result 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;


}

标签:std,return,cout,Add2Value,Fcode,result,template
From: https://www.cnblogs.com/cnetsa/p/16991851.html

相关文章