Skip to content

Instantly share code, notes, and snippets.

@ukitazume
Created December 12, 2011 11:43
Show Gist options
  • Save ukitazume/1466768 to your computer and use it in GitHub Desktop.
Save ukitazume/1466768 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int scmp(const void *p1, const void *p2) {
char *v1, *v2;
v1 = *(char **) p1;
v2 = *(char **) p2;
return strcmp(v1, v2);
}
int main (int argc, const char * argv[])
{
char *k1, *k2;
k1 = "aaaaa";
k2 = "abbbb";
printf("%d", strcmp(k1, k2));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment