Borderou de evaluare (job #2731520)
Utilizator | Data | 27 martie 2021 21:28:47 | |
---|---|---|---|
Problema | Trie | Status | done |
Runda | Arhiva educationala | Compilator | c-32 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'add':
main.c:53:18: warning: array subscript has type 'char' [-Wchar-subscripts]
if (node->child[ch] == NULL) {
^
main.c:54:18: warning: array subscript has type 'char' [-Wchar-subscripts]
node->child[ch] = &mem[alloc_cnt++];
^
main.c:55:18: warning: array subscript has type 'char' [-Wchar-subscripts]
node->child[ch]->parent = node;
^
main.c:58:21: warning: array subscript has type 'char' [-Wchar-subscripts]
node = node->child[ch];
^
main.c: In function 'rm':
main.c:96:21: warning: array subscript has type 'char' [-Wchar-subscripts]
node = node->child[ch];
^
main.c:104:14: warning: array subscript has type 'char' [-Wchar-subscripts]
node->child[ch] = 0;
^
main.c:105:61: error: invalid operands to binary * (have 'int' and 'struct TrieNode *')
node = ((node->freq == 0 && (--node->childrenCount) == 0))*node->parent;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
main.c: In function 'query':
main.c:118:21: warning: array subscript has type 'char' [-Wchar-subscripts]
node = node->child[ch];
^
main.c: In function 'prefix':
main.c:132:21: warning: array subscript has type 'char' [-Wchar-subscripts]
node = node->child[ch];
^
main.c: In function 'main':
main.c:155:17: warning: unused variable 'buf' [-Wunused-variable]
char line[32], buf[32];
^~~
main.c:158:5: warning: ignoring return value of 'freopen', declared with attribute warn_unused_result [-Wunused-result]
freopen( "trie.in", "r", stdin );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:159:2: warning: ignoring return value of 'freopen', declared with attribute warn_unused_result [-Wunused-result]
freopen( "trie.out", "w", stdout );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:162:2: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Wunused-result]
fgets(line, 32, stdin);
^~~~~~~~~~~~~~~~~~~~~~
main.c:178:3: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Wunused-result]
fgets(line, 32, stdin);
^~~~~~~~~~~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !