Borderou de evaluare (job #2071120)
Utilizator | Data | 20 noiembrie 2017 12:21:17 | |
---|---|---|---|
Problema | Zeap | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:20:29: warning: for increment expression has no effect [-Wunused-value]
for(int i = 1; i<= n; + i){
^
user.cpp:21:12: error: ‘sir’ was not declared in this scope
f>>sir;
^
user.cpp:23:16: error: ‘x’ was not declared in this scope
f>>x;
^
user.cpp:25:30: error: no match for ‘operator-’ (operand types are ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ and ‘int’)
if(it == s.end() - 1){
^
user.cpp:25:30: 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:327:5: note: template<class _Iterator> typename std::reverse_iterator<_Iterator>::difference_type std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator-(const reverse_iterator<_Iterator>& __x,
^
/usr/include/c++/4.8/bits/stl_iterator.h:327:5: note: template argument deduction/substitution failed:
user.cpp:25:32: note: ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if(it == s.end() - 1){
^
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:379:5: note: template<class _IteratorL, class _IteratorR> decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator-(const reverse_iterator<_IteratorL>& __x,
^
/usr/include/c++/4.8/bits/stl_iterator.h:379:5: note: template argument deduction/substitution failed:
user.cpp:25:32: note: ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if(it == s.end() - 1){
^
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:1104:5: note: template<class _IteratorL, class _IteratorR> decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
operator-(const move_iterator<_IteratorL>& __x,
^
/usr/include/c++/4.8/bits/stl_iterator.h:1104:5: note: template argument deduction/substitution failed:
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !