Record Detail

Compile Error

/in/set.c:14:1: error: unknown type name 'set'
 set construct()
 ^~~
/in/set.c: In function 'construct':
/in/set.c:19:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
     s->data=NULL;
            ^
/in/set.c: In function 'destruct':
/in/set.c:25:17: error: 'a' undeclared (first use in this function)
     scanf("%d", a);
                 ^
/in/set.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
/in/set.c:27:9: error: 's' undeclared (first use in this function)
         s->size = 0;
         ^
/in/set.c:30:9: error: expected '}' before 'else'
         else{
         ^~~~
/in/set.c:31:13: error: continue statement not within a loop
             continue
             ^~~~~~~~
/in/set.c:32:9: error: expected ';' before '}' token
         }
         ^
/in/set.c: At top level:
/in/set.c:34:1: error: expected identifier or '(' before '}' token
 }
 ^
/in/set.c:35:8: error: expected declaration specifiers or '...' before 'set'
 int in(set *s, int element)
        ^~~
/in/set.c:55:13: error: expected declaration specifiers or '...' before 'set'
 void insert(set *s, int element)
             ^~~
/in/set.c:66:12: error: expected declaration specifiers or '...' before 'set'
 void erase(set *s, int element)
            ^~~
/in/set.c:80:1: error: expected identifier or '(' before '}' token
 }
 ^
/in/set.c:81:12: error: expected declaration specifiers or '...' before 'set'
 void print(set *s)
            ^~~
/in/set.c:88:1: error: expected identifier or '(' before '}' token
 }
 ^
/in/set.c: In function 'main':
/in/set.c:93:5: error: statement with no effect [-Werror=unused-value]
     set w = construct();
     ^~~
/in/set.c:93:9: error: expected ';' before 'w'
     set w = construct();
         ^
/in/set.c:96:9: error: implicit declaration of function 'insert'; did you mean 'qsort'? [-Werror=implicit-function-declaration]
         insert(&w, i);
         ^~~~~~
         qsort
/in/set.c:96:17: error: 'w' undeclared (first use in this function)
         insert(&w, i);
                 ^
/in/set.c:97:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Werror=implicit-function-declaration]
         print(&w);
         ^~~~~
         printf
/in/set.c:101:9: error: implicit declaration of function 'erase' [-Werror=implicit-function-declaration]
         erase(&w, i);
         ^~~~~
/in/set.c: In function 'construct':
/in/set.c:21:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab7 Quiz
Language
C
Submit At
2020-06-30 09:33:28
Judged At
2020-06-30 09:33:28
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes