min and max of vector c++ code example
Example 1: maximum in vector
*max_element(a.begin(), a.end());
Example 2: c++ max and min of vector
auto it = max_element(std::begin(cloud), std::end(cloud)); // c++11
*max_element(a.begin(), a.end());
auto it = max_element(std::begin(cloud), std::end(cloud)); // c++11