S
subramanian100in
Consider
template <typename T>
void compare_and_print(const T & arg1, const T & arg2)
template <class T>
void compare_and_print(const T & arg1, const T & arg2)
If I use any one of these two, the compiler accepts it. That is, the
compiler accepts both "typename T" and "class T" inside the angle
brackets <>. Which form is correct ?
Kindly explain.
Thanks
V.Subramanian
template <typename T>
void compare_and_print(const T & arg1, const T & arg2)
template <class T>
void compare_and_print(const T & arg1, const T & arg2)
If I use any one of these two, the compiler accepts it. That is, the
compiler accepts both "typename T" and "class T" inside the angle
brackets <>. Which form is correct ?
Kindly explain.
Thanks
V.Subramanian