function template

can anyone covert the following function into a fuction template. Thanks a lot!

int max(inta, int b){
if (a>b) return a;
else return b;
}
Most people on this forum are not going to do your work for you. Especially when it sounds like an assignment.

I recommend you read up on templates and figure it out for yourself; it is a rather simple question and cannot really be answered with simply telling you the answer.

http://www.cplusplus.com/doc/tutorial/templates/
cheers I have done it:)
Topic archived. No new replies allowed.