Anyway, what's the purpose of the second for() loop? That's what messes up the result.
The proper way, if you don't want to use the above function, is to use a single loop.
1 2 3 4 5 6 7 8 9 10 11 12
#include <algorithm>
#include <iostream>
void find_lowest(float arr[16])
{
float r = arr[0];
for (int i=0; i<16; ++i)
r = std::min(r, arr[i]);
std::cout << r << std::endl;
}
@ Framework: Index_ is supposed to be unsigned int, and your function kills the first element of the array because of the assignment in the if(), which you obviously wanted to be a pointer assignment instead.