I'm working on the check() part of dictionary.c. I wanted to use strcasecmp() to compare the text word and the word in my dictionary. Nevertheless, it doesn't work. It keeps pop up the error :

dictionary.c:115:19: error: implicit declaration of function 'strcasecmp' is invalid in C99 [-Werror,-Wimplicit-function-declaration] result = strcasecmp(cursor,word);

Then, I used the sandbox to test code with strcasecmp(), and there is a weird bug.

enter image description here

enter image description here

I believe these two codes are 100% identical, but the one with the comment is able to compile, while the one without comment can't compile. And it's the same error with the code in my dictionary.c



   #include <strings.h>

Note the "s" on the end. string.h and strings.h are two different libraries. Try including both.

Haven't checked, but my next question is whether there are conflicting functions with the same name in both.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .