Record Detail

Compile Error

/in/inDictionary.c:5:5: error: second argument of 'main' should be 'char **' [-Werror=main]
 int main(int argc, char* argv)
     ^~~~
/in/inDictionary.c: In function 'main':
/in/inDictionary.c:12:15: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
    if (strcmp(*dic[j], argv[i]) == 0) {
               ^
In file included from /in/inDictionary.c:4: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:12:24: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
    if (strcmp(*dic[j], argv[i]) == 0) {
                        ^~~~
In file included from /in/inDictionary.c:4: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:13:14: error: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Werror=format=]
     printf("%s", 'T');
             ~^
             %d
/in/inDictionary.c:16:15: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
    if (strcmp(*dic[j], argv[i]) != 0) {
               ^
In file included from /in/inDictionary.c:4: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:16:24: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
    if (strcmp(*dic[j], argv[i]) != 0) {
                        ^~~~
In file included from /in/inDictionary.c:4: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:17:14: error: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Werror=format=]
     printf("%s", 'F');
             ~^
             %d
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Midterm Exam 2
Language
C
Submit At
2022-07-07 15:42:33
Judged At
2022-07-08 16:05:50
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes