摘要: 一、sort:1、头文件#include2、格式 sort(arry,arry + n,cmp) 说明:arry为数组名(即首元素地址)、n为数组中元素个数、cmp是自己定义的函数。因为sort默认升序排序,通过自己定义的cmp我们可以实现降序、二位排序等操作。3、应用:a、字符数组char:#include#includeusing namespace std;int main(){ char a[11]={'b','a','v','r','f','d','j','t 阅读全文
posted @ 2013-08-17 20:48 Neptunes 阅读(191) 评论(0) 推荐(0) 编辑