C Tutorial/stdlib.h/qsort — различия между версиями


Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
м (1 версия: Импорт контента...)
 
(нет различий)

Текущая версия на 10:32, 25 мая 2010

qsort

Item Value Header file stdlib.h Declaration void qsort(void *buf, size_t num, size_t size, int (*compare) (const void *, const void *)); Function sorts the array *buf using a Quicksort. Parameter The number of elements in the array is specified by num, and the size (in bytes) of each element is described by size.

The function pointed to by compare is used to compare two elements of the array.

The form of the compare function must be as follows:


int func_name(const void *arg1, const void *arg2);