Borderou de evaluare (job #718588)

Utilizator avatar ecaterina Ecaterina Stefanescu ecaterina IP ascuns
Problemă Dictionar Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 10 mai 2023 11:08:55 Scor 0

Raport evaluator

Eroare de compilare: main.cpp:17:1: error: 'vector' does not name a type 17 | vector<int> hashcuvid[HASHSIZE]; | ^~~~~~ main.cpp: In function 'void add()': main.cpp:45:5: error: 'hashcuvid' was not declared in this scope 45 | hashcuvid[hash].push_back(dictionarysize); | ^~~~~~~~~ main.cpp: In function 'int traduce()': main.cpp:65:16: error: 'hashcuvid' was not declared in this scope 65 | while (i < hashcuvid[hash].size() && strcmp(cuv, dictionar[hashcuvid[hash][i]].key)) { | ^~~~~~~~~ main.cpp:65:42: error: 'strcmp' was not declared in this scope 65 | while (i < hashcuvid[hash].size() && strcmp(cuv, dictionar[hashcuvid[hash][i]].key)) { | ^~~~~~ main.cpp:2:1: note: 'strcmp' is defined in header '<cstring>'; did you forget to '#include <cstring>'? 1 | #include <iostream> +++ |+#include <cstring> 2 | #include <stdio.h> main.cpp:69:11: error: 'hashcuvid' was not declared in this scope 69 | rez = hashcuvid[hash][i]; | ^~~~~~~~~ main.cpp:60:15: warning: unused variable 'ok' [-Wunused-variable] 60 | int hash, ok; | ^~ main.cpp: In function 'int main()': main.cpp:80:9: warning: unused variable 'nr' [-Wunused-variable] 80 | int nr, i, n, nrcuv, cuvnr, nrc, nrt, j, rez; | ^~ main.cpp:80:38: warning: unused variable 'nrt' [-Wunused-variable] 80 | int nr, i, n, nrcuv, cuvnr, nrc, nrt, j, rez; | ^~~ main.cpp:99:11: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 99 | fscanf(fout, "%d", &n); | ~~~~~~^~~~~~~~~~~~~~~~ main.cpp:105:15: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 105 | fscanf(fin, "%s%s", cuv, trad); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~