Borderou de evaluare (job #718584)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Dictionar | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 10 mai 2023 10:37:13 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:17:1: error: 'vector' does not name a type
17 | vector<int> hashwordid[HASHSIZE];
| ^~~~~~
main.cpp: In function 'void add(int, int)':
main.cpp:43:5: error: 'hashwordid' was not declared in this scope
43 | hashwordid[hash].push_back(dictionarysize);
| ^~~~~~~~~~
main.cpp:45:35: error: no match for 'operator[]' (operand types are 'idk' and 'int')
45 | dictionary[dictionarysize][j].key = cuv[j];
| ^
main.cpp:48:35: error: no match for 'operator[]' (operand types are 'idk' and 'int')
48 | dictionary[dictionarysize][j].val = trad[j];
| ^
main.cpp: In function 'int traduce(int)':
main.cpp:61:36: error: 'hashwordid' was not declared in this scope
61 | if (cuv[j]!=dictionary[hashwordid[hash][i]].key) {
| ^~~~~~~~~~
main.cpp:68:16: error: 'hashwordid' was not declared in this scope
68 | } while (i<hashwordid[hash].size() && ok==1);
| ^~~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:125:14: error: 'j' was not declared in this scope
125 | for (j=0; j<nrc; j++) {
| ^
main.cpp:128:9: error: 'rez' was not declared in this scope
128 | rez = traduce(nrc);
| ^~~
main.cpp:81:9: warning: unused variable 'nr' [-Wunused-variable]
81 | int nr, i, n, nrcuv, cuvnr, nrc, nrt;
| ^~
main.cpp:100:11: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
100 | fscanf(fout, "%d", &n);
| ~~~~~~^~~~~~~~~~~~~~~~