Borderou de evaluare (job #1882437)
Utilizator | Data | 17 februarie 2017 10:48:30 | |
---|---|---|---|
Problema | Patrate1 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In member function ‘bool Event::operator<(const Event&) const’:
user.cpp:15:33: error: ‘e’ was not declared in this scope
return x < a.x || (x == e.x && sgn < e.sgn);
^
user.cpp: At global scope:
user.cpp:20:1: error: expected initializer before ‘const’
const int Dim = 2001;
^
user.cpp:21:9: error: ‘Dim’ was not declared in this scope
Event a[Dim], m, x, y;
^
user.cpp: In function ‘int main()’:
user.cpp:25:12: error: ‘n’ was not declared in this scope
fin >> n >> h;
^
user.cpp:25:17: error: ‘h’ was not declared in this scope
fin >> n >> h;
^
user.cpp:28:16: error: cannot bind ‘std::basic_istream<char>’ lvalue to ‘std::basic_istream<char>&&’
fin >> x >> y;
^
In file included from /usr/include/c++/4.8/fstream:38:0,
from user.cpp:1:
/usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of ‘std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = Event]’
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
^
user.cpp:29:9: error: ‘e’ was not declared in this scope
e[m].x = x;
^
user.cpp:31:11: error: no ‘operator++(int)’ declared for postfix ‘++’ [-fpermissive]
m ++;
^
user.cpp:32:20: error: no match for ‘operator+’ (operand types are ‘Event’ and ‘int’)
e[m].x = y + 1;
^
user.cpp:32:20: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)
operator+(typename reverse_iterator<_Iterator>::difference_type __n,
^
/usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template argument deduction/substitution failed:
user.cpp:32:22: note: mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’
e[m].x = y + 1;
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !