abctemplate.cpp
来自「function to compute an expression using 」· C++ 代码 · 共 20 行
CPP
20 行
// template function with value parameters to compute
// an expression
#include<iostream>
using namespace std;
template<class T>
T abc(T a, T b, T c)
{
return a + b * c;
}
int main()
{
cout << abc(2,3,4) << endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?