ghostsurfer
Programmer
Does anyone know of a *good* function that will sort an array of charcter arrays alphanumerically and return a pointer to the sorted array. Such as sorting <br>char *fruits[6] { "Oranges", "Pears", "Apples", "Bananas", "Appricots", NULL }; <br>Hopefully something like this:<br>char **alpha_sort(char **p_str_arr)<br>{<br> char ** sorted_arr;<br> /* lines of code */<br> return(sorted_arr);<br>}<br>Before I write my own I figure someone must have wanted to do this before and it's probably in some header files, but my pile of C/C++ books is not accessable to me at the moment.<br><br>Thanks!