首页 > 其他 > 详细

基础-Sort函数

时间:2015-07-10 02:09:46      阅读:218      评论:0      收藏:0      [点我收藏+]
Sort elements in range
Sorts the elements in the range [first,last) into ascending order.

The elements are compared using operator< for the first version, and comp for the second.

Equivalent elements are not guaranteed to keep their original relative order (see stable_sort).

 技术分享
调用sort,引用头文件:#include <algorithm>
调用less(从小到大),greater(从大到小),引用头文件:#include <functional>
同时对于char等类型排序也是可以的。




基础-Sort函数

原文:http://www.cnblogs.com/ArronXing/p/4634597.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!