Record Detail

Compile Error

/in/inDictionary.c: In function 'main':
/in/inDictionary.c:11:34: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Werror=incompatible-pointer-types]
                 if(strcmp(dic[k],a)==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:19:17: error: continue statement not within a loop
         if(c==0)continue;
                 ^~~~~~~~
/in/inDictionary.c:20:18: error: passing argument 1 of 'strlen' from incompatible pointer type [-Werror=incompatible-pointer-types]
         l=strlen(a);
                  ^
In file included from /in/inDictionary.c:2:0:
/usr/include/string.h:384:15: note: expected 'const char *' but argument is of type 'char **'
 extern size_t strlen (const char *__s)
               ^~~~~~
/in/inDictionary.c:22:22: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
             dic[i][j]=a[j];
                      ^
/in/inDictionary.c:6:14: error: unused parameter 'argv' [-Werror=unused-parameter]
 int main(int argv,char*a[SIZE]){
              ^~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Midterm Exam 2
Language
C
Submit At
2022-07-07 14:41:01
Judged At
2022-07-08 16:06:05
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes