C++中sort函数的用法 1.sort调用 在调用前需要 #include <algorithm> sort调用格式 sort(vector.begin(),end(),(std::greater<int>(),降序的选择参数)) sort函数需要传入三个参数。前两个为指针