1 2 3 4 5 6 7 8
#include <algorithm> int main() { int g[5] = {1, 5, 6, 90, 7}; int* max = std::max_element(g, g + 5); return EXIT_SUCCESS; }