摘要:
使用C++标准库的快速排序函数C++的标准库stdlib.h中提供了快速排序函数。请在使用前加入对stdlib.h的引用:#include <cstdlib> 或 #include <stdlib.h>qsort(void* base, size_t num, size_t width, int(*)compare(const void* elem1, const void* elem2))参数表*base: 待排序的元素(数组,下标0起)。num: 元素的数量。width: 每个元素的内存空间大小(以字节为单位)。可用sizeof()测得。int(*)compare: 阅读全文
posted @ 2012-05-01 17:44
无殇天下
阅读(392)
评论(0)
推荐(0)

浙公网安备 33010602011771号