- 博客(4)
- 收藏
- 关注
原创 qsort快排函数排序(C语言版)
接下来是快排,注释很丰富,包看懂吧。看不懂可以留言,必回复!大家先了解整型排,后续我会更新更加深层的排序!!!#include<stdio.h>#include<iostream>//因为qsort函数是C++中的函数,所以引用C++的头文件using namespace std;//配套C++头文件使用的关键词int Sort(const void *e1,const void *e2){//qsort函数所调用的函数的形参需要是const void指针类型,voi.
2022-01-11 13:45:31
368
原创 C语言中的 Sort 排序
Sort函数是C++中的函数,但是我们这里可以#include<stdio.h>#include<algorithm>//algorithm译为算法,此处 #include<algorithm>是C++的一个头文件using namespace std;bool sort(int a,int b){ return a>b;}int main(){ int arr[6]={9,8,7,6,5,4}; sort(arr,arr+6);//这里6
2022-01-09 19:36:46
1251
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人