Template Example
 
 
T1 max(T1 *array, int size) {
  for (int i = 1; i < size; i++)
int int_array[] = { 10, 9, 3, 40, 600 };
double double_array[] = { 10.2, 9.3, 3.4, 40.1, 600.4 };
  int a = max(int_array, 5); 		// OK
  double b = max(double_array, 5);	// OK
  int c = max(5, 1);				// compiler error
  // Note, return type is not considered when determining
  // type of the formal parameter
  double c = max(int_array, 5); // danger will robinson