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