Borderou de evaluare (job #614441)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Dictionar | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 5 nov. 2021 16:45:15 | 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: At global scope:
main.cpp:96:13: error: ambiguating new declaration of 'const char* translate(char*)'
96 | const char* translate(char *word)
| ^~~~~~~~~
main.cpp:51:5: note: old declaration 'int translate(char*)'
51 | int translate (char *word)
| ^~~~~~~~~
main.cpp: In function 'const char* translate(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: At global scope:
main.cpp:112:7: error: expected constructor, destructor, or type conversion before '(' token
112 | printf("%s\n", translate(word));
| ^
main.cpp: In function 'int main()':
main.cpp:121:10: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
121 | fgets(sentence, N + 5, fin) ;
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
main.cpp:125:11: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
125 | fscanf(fin, "%d", &n) ;
| ~~~~~~^~~~~~~~~~~~~~~