I have a vector<data> (where data is my own type of pet) and I want to find its maximum value.
The standard function std::max in C ++ 11 works with a collection of objects, but it wants the list of initializers to be selected as the first argument, and not a set, for example vector :
vector<data> vd; std::max(vd);
How can i solve this?
c ++ c ++ 11 std initializer-list
Fabien
source share