#include "stdafx.h"
#include <iostream>
using namespace std;
template <typename T>
T max(T x, T y);
int _tmain(int argc, _TCHAR* argv[])
{
int a=1, b=2;
cout << max(a,b); // T -> int
double a=1.1, b=1.2;
cout << max(a,b); // T -> double
system("pause");
return 0;
}
template <typename T>
T max(T x, T y)
{ return x > y ? x : y; }
czego brakuje w tym kodzie? nie chce działać :/