C++标准模板库——容器 1、排序 #include <algorithm> #include <functional> sort(array.begin(), array.end(), less<int>());//升序排序 greater<int>()降序排序