Borderou de evaluare (job #1755775)

Utilizator killer301Ioan Andrei Nicolae killer301 Data 11 septembrie 2016 00:43:55
Problema Colectie Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In member function ‘void DG::operator+=(DG&)’: user.cpp:36:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k=0; k<other.ind.size(); k++) ^ user.cpp: In member function ‘bool DG::operator<(DG&)’: user.cpp:51:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while(pos < v.size() && v[pos] == other.v[pos])pos++; ^ user.cpp: In function ‘int main()’: user.cpp:150:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(tmp.size() + tmp2.size() < Min) ^ user.cpp:154:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0; i<tmp2.size(); i++) ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<DG*, std::vector<DG> >; _Tp = DG]’: /usr/include/c++/4.8/bits/stl_algo.h:2307:70: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<DG*, std::vector<DG> >]’ /usr/include/c++/4.8/bits/stl_algo.h:2338:54: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<DG*, std::vector<DG> >; _Size = int]’ /usr/include/c++/4.8/bits/stl_algo.h:5475:36: required from ‘void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<DG*, std::vector<DG> >]’ user.cpp:115:34: required from here /usr/include/c++/4.8/bits/stl_algo.h:2266:20: error: no match for ‘operator<’ (operand types are ‘DG’ and ‘const DG’) while (*__first < __pivot) ^ /usr/include/c++/4.8/bits/stl_algo.h:2266:20: note: candidates are: user.cpp:48:10: note: bool DG::operator<(DG&) bool operator < (DG &other) ^ user.cpp:48:10: note: no known conversion for argument 1 from ‘const DG’ to ‘DG&’ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/vector:60, from user.cpp:2: /usr/include/c++/4.8/bits/stl_pair.h:220: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:220:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/algorithm:62:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_algo.h:2266:20: note: ‘DG’ is not derived from ‘const std::pair<_T1, _T2>’ while (*__first < __pivot) ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/vector:60, from user.cpp:2: /usr/include/c++/4.8/bits/stl_iterator.h:297: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:297:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/4.8/algorithm:62:0,

Ceva nu functioneaza?