Borderou de evaluare (job #1358129)
Utilizator | Data | 24 februarie 2015 13:19:44 | |
---|---|---|---|
Problema | Brazi | Status | done |
Runda | Arhiva ICPC | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:14:12: error: template argument 1 is invalid
vector<hash>H[MOD+2];
^
user.cpp:14:12: error: template argument 2 is invalid
user.cpp:14:21: error: invalid type in declaration before ‘;’ token
vector<hash>H[MOD+2];
^
user.cpp: In function ‘int main()’:
user.cpp:59:18: error: request for member ‘end’ in ‘H[r]’, which is of non-class type ‘int’
if (H[r].end() == H[r].begin()) {
^
user.cpp:59:32: error: request for member ‘begin’ in ‘H[r]’, which is of non-class type ‘int’
if (H[r].end() == H[r].begin()) {
^
user.cpp:61:13: error: reference to ‘hash’ is ambiguous
hash X; X.nr=1;X.h=cod;
^
user.cpp:11:8: note: candidates are: struct hash
struct hash{
^
In file included from /usr/include/c++/4.8/bits/stl_bvector.h:1134:0,
from /usr/include/c++/4.8/vector:65,
from user.cpp:2:
/usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
user.cpp:61:18: error: expected ‘;’ before ‘X’
hash X; X.nr=1;X.h=cod;
^
user.cpp:61:21: error: ‘X’ was not declared in this scope
hash X; X.nr=1;X.h=cod;
^
user.cpp:62:18: error: request for member ‘push_back’ in ‘H[r]’, which is of non-class type ‘int’
H[r].push_back(X);
^
user.cpp:67:43: error: request for member ‘size’ in ‘H[r]’, which is of non-class type ‘int’
for(int it = 0; it < H[r].size();++it)
^
user.cpp:69:32: error: invalid types ‘int[int]’ for array subscript
if (H[r][it].h == cod) {
^
user.cpp:71:46: error: invalid types ‘int[int]’ for array subscript
printf("%d\n",H[r][it].nr);
^
user.cpp:72:32: error: invalid types ‘int[int]’ for array subscript
H[r][it].nr++;
^
user.cpp:79:21: error: reference to ‘hash’ is ambiguous
hash X; X.nr=1;X.h=cod;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !