美文网首页
59 - function Templates with Mul

59 - function Templates with Mul

作者: 社交帐号直接注册 | 来源:发表于2018-01-08 18:58 被阅读0次
#include <iostream>
using namespace std;

template <class first,class second>

first smaller(first a,second b)
{
    return(a<b?a:b);
}

int main()
{
    int x=89;
    double y=56.88;
    cout  << smaller(y,x) << endl;
}

相关文章

网友评论

      本文标题:59 - function Templates with Mul

      本文链接:https://www.haomeiwen.com/subject/gvzbnxtx.html