Created
December 12, 2011 11:43
-
-
Save ukitazume/1466768 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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