Record Detail

Compile Error

/in/ex1.c: In function 'main':
/in/ex1.c:19:34: error: format '%c' expects argument of type 'char *', but argument 3 has type 'char **' [-Werror=format=]
             while(fscanf(stdin,"%c",&filename[j])!=EOF) {printf("%c",filename[j]);}
                                 ~^  ~~~~~~~~~~~~
/in/ex1.c:19:67: error: format '%c' expects argument of type 'int', but argument 2 has type 'char *' [-Werror=format=]
             while(fscanf(stdin,"%c",&filename[j])!=EOF) {printf("%c",filename[j]);}
                                                                  ~^  ~~~~~~~~~~~
                                                                  %s
/in/ex1.c:27:22: error: conversion to 'int' from 'size_t {aka long unsigned int}' may alter its value [-Werror=conversion]
             length = strlen(filelast[i]);
                      ^~~~~~
/in/ex1.c:29:26: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
                 char c = filelast[k];
                          ^~~~~~~~
/in/ex1.c:14:11: error: unused variable 'reallast' [-Werror=unused-variable]
     char *reallast[NAME_LENGTH];
           ^~~~~~~~
/in/ex1.c:12:11: error: unused variable 'allreallast' [-Werror=unused-variable]
     char *allreallast[FILE_NUMBER];
           ^~~~~~~~~~~
/in/ex1.c:11:11: error: unused variable 'filenum' [-Werror=unused-variable]
     char *filenum[FILE_NUMBER];
           ^~~~~~~
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:37:13
Judged At
2022-07-08 16:06:00
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes