Borderou de evaluare (job #1741476)
Utilizator | Data | 14 august 2016 00:28:10 | |
---|---|---|---|
Problema | Hashuri | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:10:42: warning: ‘typedef’ was ignored in this declaration [enabled by default]
typedef struct hash {int inf; hash *urm;};
^
user.cpp:11:2: error: reference to ‘hash’ is ambiguous
hash *H[P];
^
user.cpp:10:17: note: candidates are: struct hash
typedef struct hash {int inf; hash *urm;};
^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
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:11:2: error: ‘hash’ does not name a type
hash *H[P];
^
user.cpp: In function ‘void insert(int)’:
user.cpp:16:6: error: reference to ‘hash’ is ambiguous
hash *p;
^
user.cpp:10:17: note: candidates are: struct hash
typedef struct hash {int inf; hash *urm;};
^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
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:16:12: error: ‘p’ was not declared in this scope
hash *p;
^
user.cpp:17:9: error: ‘H’ was not declared in this scope
if(H[x%P]==NULL)
^
user.cpp:19:21: error: expected type-specifier before ‘hash’
H[x%P]=new hash;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !