how to pick the maximum element from a vector in c++ code example Example: maximum in vector *max_element(a.begin(), a.end());