摘要:
头文件都是:#include<algorithm>qsort篇qsort(a,len,sizeof(type),mycmp)//注释a:待排序的数组地址len:待排序的数组的长度type:待排序的数组元素的类型mycmp:自定义的排序函数 1 /****************一维数组类比较函数************ 2 int mycmp(const void *a,const void *b) 3 { 4 return *(int *)a - *(int *)b; 5 } 6 //注 char、float、double型数组时 7 //只需将return中的int改成相应的类 阅读全文
posted @ 2013-04-19 17:01
天天AC
阅读(204)
评论(0)
推荐(0)

浙公网安备 33010602011771号