Borderou de evaluare (job #1428594)
Utilizator | Data | 4 mai 2015 19:50:06 | |
---|---|---|---|
Problema | String | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int buildhash()’:
user.cpp:18:9: error: reference to ‘hash’ is ambiguous
hash[sol+put2[i]]=1;
^
user.cpp:7:20: note: candidates are: int hash [2000001]
int n,k,put2[18],i,hash[maxvalue];
^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
from /usr/include/c++/4.8/string:52,
from user.cpp:3:
/usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
user.cpp:23:11: error: reference to ‘hash’ is ambiguous
hash[sol+put2[i]]=1;
^
user.cpp:7:20: note: candidates are: int hash [2000001]
int n,k,put2[18],i,hash[maxvalue];
^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
from /usr/include/c++/4.8/string:52,
from user.cpp:3:
/usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
user.cpp:26:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
user.cpp: In function ‘int main()’:
user.cpp:36:9: error: reference to ‘hash’ is ambiguous
if (hash[i]==0) break;
^
user.cpp:7:20: note: candidates are: int hash [2000001]
int n,k,put2[18],i,hash[maxvalue];
^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
from /usr/include/c++/4.8/string:52,
from user.cpp:3:
/usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
user.cpp:28:31: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("string.in","r",stdin);
^
user.cpp:29:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("string.out","w",stdout);
^
user.cpp:30:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d\n",&n);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !