Name: Anonymous 2008-03-10 5:54
Why does qsort work while bsearch causes a segmentation fault when they both have the same arguments?
char *word
...
qsort(dictionary, dictionarySize, sizeof(char *), dict_compare);
bsearch(word, dictionary, dictionarySize, sizeof(char *), dict_compare);
It works if I replace bsearch with manually stepping through the array. Any ideas?
char *word
...
qsort(dictionary, dictionarySize, sizeof(char *), dict_compare);
bsearch(word, dictionary, dictionarySize, sizeof(char *), dict_compare);
It works if I replace bsearch with manually stepping through the array. Any ideas?