1// function template
2#include <iostream>
3using namespace std;
4
5template <class T>
6T GetMax (T a, T b) {
7 T result;
8 result = (a>b)? a : b;
9 return (result);
10}
11
12int main () {
13 int i=5, j=6, k;
14 long l=10, m=5, n;
15 k=GetMax<int>(i,j);
16 n=GetMax<long>(l,m);
17 cout << k << endl;
18 cout << n << endl;
19 return 0;
20}