Borderou de evaluare (job #2681982)
Utilizator | Data | 7 decembrie 2020 15:59:11 | |
---|---|---|---|
Problema | Peru | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:11:13: error: invalid use of non-static data member 'InParser::BUFF_SIZE'
char buff[BUFF_SIZE]
^~~~~~~~~
main.cpp:9:25: note: declared here
const int BUFF_SIZE = 2048;
^~~~
main.cpp:11:22: error: expected ';' at end of member declaration
char buff[BUFF_SIZE]
^
main.cpp:42:3: error: expected ';' at end of member declaration
}
^
main.cpp:14:3: error: expected ';' before 'char'
char read_ch() {
^~~~
main.cpp: In function 'int main()':
main.cpp:148:25: error: no matching function for call to 'InParser::InParser(const char [8])'
InParser cin("peru.in");
^
main.cpp:7:7: note: candidate: InParser::InParser()
class InParser {
^~~~~~~~
main.cpp:7:7: note: candidate expects 0 arguments, 1 provided
main.cpp:7:7: note: candidate: constexpr InParser::InParser(const InParser&)
main.cpp:7:7: note: no known conversion for argument 1 from 'const char [8]' to 'const InParser&'
main.cpp:7:7: note: candidate: constexpr InParser::InParser(InParser&&)
main.cpp:7:7: note: no known conversion for argument 1 from 'const char [8]' to 'InParser&&'
main.cpp:151:17: error: no match for 'operator>>' (operand types are 'InParser' and 'int')
int n, k; cin >> n >> k;
~~~~^~~~
In file included from /usr/include/c++/6/string:53: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.tcc:1437:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator>>(basic_istream<_CharT, _Traits>& __in,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.tcc:1437:5: note: template argument deduction/substitution failed:
main.cpp:151:20: note: 'InParser' is not derived from 'std::basic_istream<_CharT, _Traits>'
int n, k; cin >> n >> k;
^
In file included from /usr/include/c++/6/istream:934:0,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !