Check out example codes for "max element in array c++ stl". It will help you in understanding the concepts better.

Code Example 1

*max_element (first_index, last_index); ex:- for an array arr of size n *max_element(arr, arr + n);

Code Example 2

cout << " max element is: " << *max_element(array , array + n) << endl;

Learn ReactJs, React Native from akashmittal.com