function template

From: nikola (sendspam_at_here.lol)
Date: 05/31/04


Date: Mon, 31 May 2004 13:23:05 GMT

Hi all,
I was working with a simple function template to find the min of two values.
But since I would like the two values to be different (type) I dont know
what kind of value (type) it will return. I tried to write something like
this:

template <class Type1, class Type2, class Type3>
Type3 findMin(Type1 x, Type2 y){

return (x < y) ? x : y;
}

but it says it cannot deduce template argument for 'Type3'
Can anyone help? Thanx