enum class comp {
age,
weight
};
struct person {
int age;
int weight;
static auto max(std::vector<person> x, comp(y)) {
if (comp(y) == comp::age) {
for (person e : x) {
auto max = 0;
for (card e : x) {
if (max < e)
max = e;
}
}
}
i am trying to find the max value of age, weight from this vector of a struct construction.