Borderou de evaluare (job #1793315)
Utilizator | Data | 30 octombrie 2016 21:47:42 | |
---|---|---|---|
Problema | Potrivirea sirurilor | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:22:26: error: ‘int index’ redeclared as different kind of symbol
int val = 0, prime = 61, index = 1;
^
In file included from /usr/include/c++/4.8/cstring:42:0,
from user.cpp:6:
/usr/include/string.h:482:1: error: previous declaration of ‘const char* index(const char*, int)’
index (__const char *__s, int __c) __THROW
^
user.cpp: In function ‘int hash_cal(std::string)’:
user.cpp:25:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < p.size(); i++)
^
user.cpp:27:34: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator*’
val += index * (p[i] - 52);
^
user.cpp:28:15: error: overloaded function with no contextual type information
index *= prime;
^
user.cpp: In function ‘void recalc_hash(std::string, std::vector<int>&, int)’:
user.cpp:42:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = indexx + 1; i < p.size(); i++)
^
user.cpp: In function ‘int main()’:
user.cpp:58:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < x.size(); i++)
^
user.cpp:62:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < y.size(); i++)
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !