1234
auto iterator_to_max_age_element = std::max_element(theVector.begin(), theVector.end(), [] (Object const lhs, Object const rhs) { return lhs.age < rhs.age; }); cout << "Max age is " << (*iterator_to_max_age_element).age;