/*////////////////////////////////////*/
#include
#include
/* Prototype of the C++ function. */
int SizeArray(void);
/*////////////////////////////////////*/
/* The compare function for qsort().  */
/*////////////////////////////////////*/
static int comp(const void *a, const void *b)
{
    return strcmp(*(char **)a, *(char **)b);
}
/*////////////////////////////////////*/
/* C function called from C++ program.*/
/*////////////////////////////////////*/
void SortCharArray(char **List)
{
    int sz = SizeArray();
    qsort(List, sz, sizeof(char *), comp);
}

Like it on Facebook, Tweet it or share this article on other bookmarking websites.

No comments