I am trying to find the \'biggest\' element in a user made array ,by using the max function from the algorithm library/header.
I have done some research on the cplusplus
max_element
is the function you need. It returns an iterator to the max element in given range. You can use it like this:
cout << " max element is: " << *max_element(array , array + n) << endl;
Here you can find more information about this function: http://en.cppreference.com/w/cpp/algorithm/max_element