Borderou de evaluare (job #2266769)
Utilizator | Data | 22 octombrie 2018 21:20:46 | |
---|---|---|---|
Problema | Sub | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In constructor 'Trie::Trie()':
main.cpp:11:38: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
memset(fiu, NULL, sizeof(fiu));
^
main.cpp: In function 'void add(Trie, char*, bool)':
main.cpp:15:14: warning: NULL used in arithmetic [-Wpointer-arith]
if(*p == NULL) return ;
^~~~
main.cpp:16:9: error: base operand of '->' has non-pointer type 'Trie'
if(T->fiu[*p - 'a'] == NULL){
^~
main.cpp:17:10: error: base operand of '->' has non-pointer type 'Trie'
T->fiu[*p - 'a'] = new Trie;
^~
main.cpp:18:10: error: base operand of '->' has non-pointer type 'Trie'
T->ok = val;
^~
main.cpp:22:25: error: base operand of '->' has non-pointer type 'Trie'
if(val == 0 && T->ok == 1) --Sol;
^~
main.cpp:23:10: error: base operand of '->' has non-pointer type 'Trie'
T->ok = 0;
^~
main.cpp:25:14: error: expected primary-expression before 'T'
add(Trie T->fiu[*p - 'a'], p + 1);
^
main.cpp: In function 'int main()':
main.cpp:34:21: error: 'a' was not declared in this scope
scanf("%s", a);
^
main.cpp:36:13: error: 'T' was not declared in this scope
add(T, a + j, 1);
^
main.cpp:41:21: error: 'b' was not declared in this scope
scanf("%s", b);
^
main.cpp:43:13: error: 'T' was not declared in this scope
add(T, b + j, 0);
^
main.cpp:29:34: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("sub.in", "r", stdin);
^
main.cpp:30:36: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("sub.out", "w", stdout);
^
main.cpp:32:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
main.cpp:39:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !