Record Detail

Compile Error

/in/inDictionary.c: In function 'main':
/in/inDictionary.c:36:27: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
                 if(strcmp(input[k],dictionary[z])==0){
                           ^~~~~
In file included from /in/inDictionary.c:2:0:
/usr/include/string.h:136:12: note: expected 'const char *' but argument is of type 'char'
 extern int strcmp (const char *__s1, const char *__s2)
            ^~~~~~
/in/inDictionary.c:36:36: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
                 if(strcmp(input[k],dictionary[z])==0){
                                    ^~~~~~~~~~
In file included from /in/inDictionary.c:2:0:
/usr/include/string.h:136:12: note: expected 'const char *' but argument is of type 'char'
 extern int strcmp (const char *__s1, const char *__s2)
            ^~~~~~
/in/inDictionary.c:47:12: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
         if(result = 0){
            ^~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Problem
mid2 ex1
Homework
Mid2
Language
C
Submit At
2023-07-13 15:41:52
Judged At
2023-08-05 22:15:30
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes