Hello,
I am trying to make a function which will return the maximum value in an array. This function returns 0. I figured the for loop will iterate over all the elements of the array. It looks like its not. Please help.
Thanks..
Code:float Maximum(float* item, int el) { float max = 0.0f; for (int i = 0; i < el; ++i) { if (item[i] > item[i]+1) max = item[i]; ++item[i]; } return max; }