Record Detail

Compile Error

/in/ex1.c: In function 'main':
/in/ex1.c:26:20: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
         if (strcmp(wordA[k], wordB[k]) != 0) {
                    ^~~~~
In file included from /in/ex1.c:3: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/ex1.c:26:30: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
         if (strcmp(wordA[k], wordB[k]) != 0) {
                              ^~~~~
In file included from /in/ex1.c:3: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/ex1.c:7:18: error: unused variable 'judgement' [-Werror=unused-variable]
     int i, j, k, judgement,sizerec; //use strcmp to give values to judgement
                  ^~~~~~~~~
/in/ex1.c:31:20: error: 'sizerec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             sizerec++; // records the size of the prefix
             ~~~~~~~^~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Mid2
Language
C
Submit At
2024-07-30 10:24:36
Judged At
2024-08-12 14:29:28
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes