Borderou de evaluare (job #614442)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Dictionar | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 5 nov. 2021 16:47:13 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:18:11: error: size of array 'dictionar' exceeds maximum object size '2147483647'
18 | DICTIONAR dictionar[N] ;
| ^~~~~~~~~
main.cpp: In function 'int translate(char*)':
main.cpp:57:64: error: 'dictionar' was not declared in this scope
57 | for(i = 0 ; i < hash_to_word[hash].size() and strcmp(word, dictionar[hash_to_word[hash][i]].cheie) ; i++) {}
| ^~~~~~~~~
main.cpp: In function 'void add(char*, char*)':
main.cpp:71:64: error: 'dictionar' was not declared in this scope
71 | for(i = 0 ; i < hash_to_word[hash].size() and strcmp(word, dictionar[hash_to_word[hash][i]].cheie) ; i++) {}
| ^~~~~~~~~
main.cpp:76:20: error: 'dictionar' was not declared in this scope
76 | copy(word, dictionar[size].cheie) ;
| ^~~~~~~~~
main.cpp: In function 'void remove(char*)':
main.cpp:87:64: error: 'dictionar' was not declared in this scope
87 | for(i = 0 ; i < hash_to_word[hash].size() and strcmp(word, dictionar[hash_to_word[hash][i]].cheie) ; i++) {}
| ^~~~~~~~~
main.cpp: In function 'const char* translate_new(char*)':
main.cpp:102:64: error: 'dictionar' was not declared in this scope
102 | for(i = 0 ; i < hash_to_word[hash].size() and strcmp(word, dictionar[hash_to_word[hash][i]].cheie) ; i++) {}
| ^~~~~~~~~
main.cpp:105:16: error: 'dictionar' was not declared in this scope
105 | return dictionar[i].valoare ;
| ^~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:118:10: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
118 | fgets(sentence, N + 5, fin) ;
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
main.cpp:122:11: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
122 | fscanf(fin, "%d", &n) ;
| ~~~~~~^~~~~~~~~~~~~~~