天天看点

未定义标识符“greater“

使用Visual Studio2013,在使用C++ STL中的sort(v2.begin(), v2.end(), greater());从大到小排序时,显示错误,未定义标识符"greater".

解决方法:在头文件中加入以下代码就不会报错了。