get max value in int vector c++ code example Example: max of a vector c++ cout<<*max_element(a.begin(), a.end())<<endl;