Started working with templates, don't fully understand things. What I think I'm trying to do is to make a template that compares 5 array elements of a yet to be determined type and returns the largest element. Currently when I run as is it returns Integer max is: 1606416160 Decimal max is: 2.81006e+101. Which I don't really get. It makes me pass the arrays in by address which I'm not sure why. Do I need to be using pointers or is there something else I'm missing? Any help welcomed.
Lines 21 and 22 are incorrect - instead pf passing the array from the beginning, you're passing the array from the element after the last element. This results in you reading random memory.