Top "Qsort" questions

qsort is the name of a C standard library function that sorts arrays using a caller-provided comparison function.

Warning when using qsort in C

I wrote my comparison function int cmp(const int * a,const int * b) { if (*a==*b) return 0; else if (*a &…

c qsort
Problem trying to use the C qsort function

#include <stdio.h> #include <stdlib.h> float values[] = { 4, 1, 10, 9, 2, 5, -1, -9, -2,10000,-0.05,-3,-1.1 }; int compare (…

c c89 qsort
Golang custom sort is faster than native sort

I was just playing around with sorting in golang and I found a qsort function on stackoverflow. It seems to …

sorting go native qsort
C qsort not working correctly

I don't know what I'm doing wrong but the following code does not sort the array properly. #include <stdio.…

c qsort
Sort an array based on members of another array in C++

my problem is the next (is an easy example to show the problem): I have: int* array1; double* array2. array1=…

c++ arrays sorting qsort
Using qsort() with class pointers

I am using the in-built function qsort() to sort a vector of class item pointers. class item { int value; vector&…

c++ visual-studio-2010 pointers std qsort