template <class T>
T max(T a, T b)
{
return ( a > b )? a : b;
}
for built in data types it will work fine .. if we send class objects as parameters then how it will work??
Class must overload the ">" operator and have an accessible copy constructor.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks