Borderou de evaluare (job #2523511)
Utilizator | Data | 14 ianuarie 2020 11:50:02 | |
---|---|---|---|
Problema | Bool | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'bool check_and(std::__cxx11::string&)':
main.cpp:20:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return p+2 < s.length() && s[p] == 'A' && s[p+1] == 'N' && s[p+2] == 'D';
~~~~^~~~~~~~~~~~
main.cpp: In function 'bool check_or(std::__cxx11::string&)':
main.cpp:25:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return p+1 < s.length() && s[p] == 'O' && s[p+1] == 'R';
~~~~^~~~~~~~~~~~
main.cpp: In function 'bool element(std::__cxx11::string&)':
main.cpp:69:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (p+2 < s.length() && s[p] == 'N' && s[p+1] == 'O' && s[p+2] == 'T'){
~~~~^~~~~~~~~~~~
main.cpp:79:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}else if (p+3 < s.length() && s[p] == 'T' && s[p+1] == 'R' && s[p+2] == 'U' && s[p+3] == 'E'){
~~~~^~~~~~~~~~~~
main.cpp:82:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}else if (p+4 < s.length() && s[p] == 'F' && s[p+1] == 'A' && s[p+2] == 'L' && s[p+3] == 'S' && s[p+4] == 'E'){
~~~~^~~~~~~~~~~~
main.cpp:87:26: warning: array subscript has type 'char' [-Wchar-subscripts]
ret ^= val[s[p-1]];
^
main.cpp: In function 'int main()':
main.cpp:97:25: error: no matching function for call to 'getline(std::ifstream&, std::__cxx11::string&, int)'
getline(fin, s, 1005);
^
In file included from /usr/include/stdio.h:933:0,
from /usr/include/c++/6/cstdio:42,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:46,
from main.cpp:1:
/usr/include/x86_64-linux-gnu/bits/stdio.h:115:1: note: candidate: __ssize_t getline(char**, size_t*, FILE*)
getline (char **__lineptr, size_t *__n, FILE *__stream)
^~~~~~~
/usr/include/x86_64-linux-gnu/bits/stdio.h:115:1: note: no known conversion for argument 1 from 'std::ifstream {aka std::basic_ifstream<char>}' to 'char**'
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from main.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5398:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
getline(basic_istream<_CharT, _Traits>&& __is,
^~~~~~~
/usr/include/c++/6/bits/basic_string.h:5398:5: note: template argument deduction/substitution failed:
main.cpp:97:25: note: candidate expects 2 arguments, 3 provided
getline(fin, s, 1005);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !