Borderou de evaluare (job #1963452)
Utilizator | Data | 12 aprilie 2017 15:44:17 | |
---|---|---|---|
Problema | Divseq | 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:19:59: error: conversion from ‘std::multiset<long long int>::iterator {aka std::_Rb_tree_const_iterator<long long int>}’ to non-scalar type ‘std::multiset<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ requested
multiset <int> :: iterator it = m.lower_bound(a[i]);
^
user.cpp:20:15: error: no match for ‘operator==’ (operand types are ‘std::multiset<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ and ‘std::multiset<long long int>::iterator {aka std::_Rb_tree_const_iterator<long long int>}’)
if(it == m.end()){
^
user.cpp:20:15: note: candidates are:
In file included from /usr/include/c++/4.8/set:60:0,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_tree.h:298:7: note: bool std::_Rb_tree_const_iterator<_Tp>::operator==(const _Self&) const [with _Tp = int; std::_Rb_tree_const_iterator<_Tp>::_Self = std::_Rb_tree_const_iterator<int>]
operator==(const _Self& __x) const
^
/usr/include/c++/4.8/bits/stl_tree.h:298:7: note: no known conversion for argument 1 from ‘std::multiset<long long int>::iterator {aka std::_Rb_tree_const_iterator<long long int>}’ to ‘const _Self& {aka const std::_Rb_tree_const_iterator<int>&}’
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/bits/stl_tree.h:61,
from /usr/include/c++/4.8/set:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template argument deduction/substitution failed:
user.cpp:20:24: note: ‘std::multiset<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::pair<_T1, _T2>’
if(it == m.end()){
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/stl_tree.h:61,
from /usr/include/c++/4.8/set:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template<class _Iterator> bool 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:291:5: note: template argument deduction/substitution failed:
user.cpp:20:24: note: ‘std::multiset<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if(it == m.end()){
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/stl_tree.h:61,
from /usr/include/c++/4.8/set:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template<class _IteratorL, class _IteratorR> bool 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:341:5: note: template argument deduction/substitution failed:
user.cpp:20:24: note: ‘std::multiset<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
if(it == m.end()){
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/stl_tree.h:61,
from /usr/include/c++/4.8/set:60,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !