« cpp/algorithm/qsort » : différence entre les versions
De cppreference.com
m r2.7.3) (robot Ajoute : de, en, es, it, pt, ru Retire : fr |
m Use {{lc}}. Update links. Various fixes. |
||
| Ligne 2 : | Ligne 2 : | ||
{{cpp/title|qsort}} | {{cpp/title|qsort}} | ||
{{cpp/algorithm/navbar}} | {{cpp/algorithm/navbar}} | ||
{{ | {{begin}} | ||
{{ | {{header | cstdlib}} | ||
{{ | {{| | ||
void qsort( const void *ptr, size_t count, size_t size, | void qsort( const void *ptr, size_t count, size_t size, | ||
int (*comp)(const void *, const void *) ); | int (*comp)(const void *, const void *) ); | ||
}} | }} | ||
{{ | {{end}} | ||
{{tr|Trie le tableau donné pointé par {{tt|ptr}} dans l'ordre croissant. Le tableau contient des éléments {{tt|count}} de {{tt|size}} taille. Fonction pointée par {{tt|comp}} est utilisé pour la comparaison d'objets .|Sorts the given array pointed to by {{tt|ptr}} in ascending order. The array contains {{tt|count}} elements of size {{tt|size}}. Function pointed to by {{tt|comp}} is used for object comparison.}} | {{tr|Trie le tableau donné pointé par {{tt|ptr}} dans l'ordre croissant. Le tableau contient des éléments {{tt|count}} de {{tt|size}} taille. Fonction pointée par {{tt|comp}} est utilisé pour la comparaison d'objets .|Sorts the given array pointed to by {{tt|ptr}} in ascending order. The array contains {{tt|count}} elements of size {{tt|size}}. Function pointed to by {{tt|comp}} is used for object comparison.}} | ||
===Paramètres=== | ===Paramètres=== | ||
{{ | {{begin}} | ||
{{ | {{| ptr |{{tr| pointeur vers le tableau à trier| pointer to the array to sort}}}} | ||
{{ | {{| count |{{tr| nombre d'éléments dans le tableau| number of element in the array}}}} | ||
{{ | {{| size |{{tr| taille de chaque élément dans le tableau en octets| size of each element in the array in bytes}}}} | ||
{{ | {{ccmp | comp }} | ||
{{ | {{end}} | ||
===Retourne la valeur=== | ===Retourne la valeur=== | ||
| Ligne 60 : | Ligne 60 : | ||
===Voir aussi=== | ===Voir aussi=== | ||
{{ | {{begin}} | ||
{{ | {{| cpp/algorithm/bsearch}} | ||
{{ | {{| cpp/algorithm/sort}} | ||
{{ | {{| cpp/types/is_trivial}} | ||
{{ | {{see c | c/algorithm/qsort}} | ||
{{ | {{end}} | ||
[[de:cpp/algorithm/qsort]] | [[de:cpp/algorithm/qsort]] | ||
Dernière version du 2 juillet 2013 à 11:27
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody>| Déclaré dans l'en-tête <cstdlib>
|
||
void qsort( const void *ptr, size_t count, size_t size, int (*comp)(const void *, const void *) ); |
||
Trie le tableau donné pointé par
ptr dans l'ordre croissant. Le tableau contient des éléments count de size taille. Fonction pointée par comp est utilisé pour la comparaison d'objets .Original:
Sorts the given array pointed to by
ptr in ascending order. The array contains count elements of size size. Function pointed to by comp is used for object comparison.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Paramètres
| ptr | - | pointeur vers le tableau à trier
Original: pointer to the array to sort The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| count | - | nombre d'éléments dans le tableau
Original: number of element in the array The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| size | - | taille de chaque élément dans le tableau en octets
Original: size of each element in the array in bytes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| comp | - | comparison function which returns a negative integer value if the first argument is less than the second, a positive integer value if the first argument is greater than the second and zero if the arguments are equal.
The function must not modify the objects passed to it. |
Retourne la valeur
(Aucun)
Original:
(none)
The text has been machine-translated via