Template function

can anyone tell me why my code isn’t working ?please!

Hi! Welcome to the forums!

I think the issue is in the name max in your template function declaration. If you change the name it should cover that end of the errors.

I wonder if using int t and class t also raises an issue… I guess you can call it T… though I’m not a fan of single letter names but I guess they do this in cpp…

template <class T>
T something(T a, T b)


still shows the error even after trying the way you said.
please help me with this!

you’re still calling it T max, change the max out i think.