Record Detail

Compile Error

/in/ex1.c: In function 'main':
/in/ex1.c:15:38: error: implicit declaration of function 'strlwr'; did you mean 'strlen'? [-Werror=implicit-function-declaration]
         if (strcmp(total[i].typename,strlwr(file))==0){
                                      ^~~~~~
                                      strlen
/in/ex1.c:15:38: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
In file included from /in/ex1.c:2:0:
/usr/include/string.h:136:12: note: expected 'const char *' but argument is of type 'int'
 extern int strcmp (const char *__s1, const char *__s2)
            ^~~~~~
/in/ex1.c:21:36: error: passing argument 2 of 'strcpy' makes pointer from integer without a cast [-Werror=int-conversion]
         strcpy(total[num].typename,strlwr(file));
                                    ^~~~~~
In file included from /in/ex1.c:2:0:
/usr/include/string.h:121:14: note: expected 'const char * restrict' but argument is of type 'int'
 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Problem
Mid2 Ex1
Homework
Midterm Exam 2
Language
C
Submit At
2022-07-07 15:00:02
Judged At
2022-07-08 16:05:19
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes