Borderou de evaluare (job #1153848)
Utilizator | Data | 25 martie 2014 19:38:18 | |
---|---|---|---|
Problema | Potrivirea sirurilor | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:20:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(i<n.length())
^
user.cpp:24:31: error: invalid use of member function (did you forget the ‘()’ ?)
if(n.substr(i,m.length()-p.length)==m.substr(p.length)) b.push_back(i);
^
user.cpp:24:57: error: no matching function for call to ‘std::basic_string<char>::substr(<unresolved overloaded function type>)’
if(n.substr(i,m.length()-p.length)==m.substr(p.length)) b.push_back(i);
^
user.cpp:24:57: note: candidate is:
In file included from /usr/local/include/c++/4.8.0/string:52:0,
from /usr/local/include/c++/4.8.0/bits/locale_classes.h:40,
from /usr/local/include/c++/4.8.0/bits/ios_base.h:41,
from /usr/local/include/c++/4.8.0/ios:42,
from /usr/local/include/c++/4.8.0/istream:38,
from /usr/local/include/c++/4.8.0/fstream:38,
from user.cpp:1:
/usr/local/include/c++/4.8.0/bits/basic_string.h:2206:7: note: std::basic_string<_CharT, _Traits, _Alloc> std::basic_string<_CharT, _Traits, _Alloc>::substr(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]
substr(size_type __pos = 0, size_type __n = npos) const
^
/usr/local/include/c++/4.8.0/bits/basic_string.h:2206:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::basic_string<char>::size_type {aka unsigned int}’
user.cpp:30:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i=0;i<b.size()&&i<1000;i++) out<<b.at(i)<<" ";
^
user.cpp:14:6: warning: unused variable ‘a’ [-Wunused-variable]
int a=0;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !