1 #include <iostream.h>
2
3 #define define_max(type) type max(type d1, type d2) { return ((d1 > d2) ? d1 : d2);}
4
5 define_max(int);
6 define_max(double);
7 define_max(char);
8
9 void main()
10 {
11 int i = max(3, 5);
12 cout << "i : " << i << endl;
13 double d = max(3.5, 5.3);
14 cout << "d : " << d << endl;
15 char c = max('A', 'B');
16 cout << "c : " << c << endl;
17 }