Using comparing operetors on variables defined by Templates
I cant figure out the syntax for how to create new operators such as '<', '>', '==', etc. for variables defined by Templates
for example:
/////////////////////////////////////////////////////////////////////////////
template <class T>
class Whatever
{
private:
T tData;
public:
tData GetLargest(tData, tData);
};
tData Whatever<T>::GetLargest(tData tD1, tData tD2)
{
if(tD1 > tD2) return tD1;
else return tD2;
}
void main(vodi)
{
Whatever <unsigned int> W;
W.GetLargers(2, 4);
}
/////////////////////////////////////////////////////////////////////////////
Now this will work since '<' is not defined for this type, so my question is, how do i make my own operator when it has to do
with templates?
thx
/Laos