/*////////////////////////////////////*/
#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, +1 on Google, Tweet it or share this article on other bookmarking websites.

Comments (0)

There are no comments posted here yet