Borderou de evaluare (job #1487606)
Utilizator | Data | 17 septembrie 2015 09:24:31 | |
---|---|---|---|
Problema | Potrivirea sirurilor | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void read()’:
user.cpp:16:26: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[2000002]’ [-Wformat=]
scanf("%s\n",&pattern);
^
user.cpp:17:18: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[2000002]’ [-Wformat=]
scanf("%s",&s);
^
user.cpp: In function ‘void solve()’:
user.cpp:33:8: error: reference to ‘hash’ is ambiguous
hs=hash(s);
^
user.cpp:22:5: note: candidates are: int hash(char*)
int hash(char ss[nmax])
^
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/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
user.cpp:34:14: error: reference to ‘hash’ is ambiguous
hpattern=hash(pattern);
^
user.cpp:22:5: note: candidates are: int hash(char*)
int hash(char ss[nmax])
^
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/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
user.cpp:50:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<v.size();i++)
^
user.cpp: In function ‘void read()’:
user.cpp:16:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%s\n",&pattern);
^
user.cpp:17:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !