利用c函数qsort对结构体进行排序 [code="java"]#include #include typedef struct{ int x; int y; int h;}dot;int cmp(const void *a, const void *b){ return (*(dot *)a).h - (*(dot *)b).h;}int main(){ dot line[9]... 算法设计 2023-12-04 108 点赞 1 评论 163 浏览