Check the correct ways of calling functions:
vоid f(int,int);

tеmрlаtе<сlаss Т>
vоid f(Т,Т=Т());
An integer value cannot be automatically cast to a pointer type, just like the other way around.
In the case when both parameters can be cast to int type (albeit with loss of precision) and the template parameter is not set, a non-template function will be called.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes