char *myCharacters[3] = { "TomJohn", "George", "Charles Condomine" };
qsort_b(myCharacters, 3, sizeof(char *), ^(const void *l, const void *r) {
char *left = *(char **)l;
char *right = *(char **)r;
return strncmp(left, right, 1);
});
for (int i=0; i<3; i++) {
printf("%s\n",myCharacters[i]);
}
*(char **) != char*,布布扣,bubuko.com
原文:http://www.cnblogs.com/anjsxz/p/3805821.html