C++问题,666666666666

img

img

img

img


说我*max_element没有定义,应该怎么改,

img


6666666666666666666666666666666666666666666666666666

我都看不懂你这是在干啥
看样子你想拿它当个函数调用,可是函数前面加星号又是几个意思,这是什么语言的语法呀

#include <algorithm>

const Student& highestScoreStudent = *std::max_element(students.begin(), students.end(),
    [](const Student& s1, const Student& s2) {
        return s1.entranceScore< s2.entranceScore; // 根据成绩进行比较
    });
#include <algorithm>