#include <algorithm> template< class RandomIt > void sort( RandomIt first, RandomIt last ); template< class RandomIt, class Compare > void sort( RandomIt first, RandomIt last, Compare comp );
默认的顺序为升序。
bool cmp1(int a,int b)//int为数组数据类型 { return a>b;//降序排列 //return a<b;//默认的升序排列 }