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