+ 1
Write template function that returns the average of three number?(using oop) in C?
plz any one send me ths program today..
2 odpowiedzi
0
Do you mean in C++? The C language doesn't support templates.
0
template <typename T>
T average(T t1, T t2, T t3)
{
return (t1 + t2 + t3) / 3;
}
It's cpp. C isn't OOP lang and doesn't support templates as already answered.