1// function templates
2#include <iostream>
3using namespace std;
4
5template <class T, class U>
6bool are_equal (T a, U b)
7{
8 return (a==b);
9}
10
11int main ()
12{
13 if (are_equal(10,10.0))
14 cout << "x and y are equal\n";
15 else
16 cout << "x and y are not equal\n";
17 return 0;
18}