maximum n values in a vector c++ code example Example: maximum in vector *max_element(a.begin(), a.end());