Hi there,
I'm trying to write a compare function to be used in a qsort of a large array of strings.
It has to compare, but ignore the leading white space, and only the leading white space.
This is what I have so far, but it is crashing.
Code:int cmpwhiteSpaceAsc(const void *p, const void *q) { char **pp = (char**)p; char **qq = (char**)q; while(isspace(*pp)) pp++; return strcmp(*pp, *qq); }