Borderou de evaluare (job #1755865)
Utilizator | Data | 11 septembrie 2016 12:04:45 | |
---|---|---|---|
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:37: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<(const DG&)’:
user.cpp:52: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 ‘bool cmp(DG&, DG&)’:
user.cpp:78:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pos < a.v.size() && a.v[pos] == b.v[pos])pos++;
^
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&, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<DG*, std::vector<DG> >; _Tp = DG; _Compare = bool (*)(DG&, DG&)]’:
/usr/include/c++/4.8/bits/stl_algo.h:2319:78: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<DG*, std::vector<DG> >; _Compare = bool (*)(DG&, DG&)]’
/usr/include/c++/4.8/bits/stl_algo.h:2360:62: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<DG*, std::vector<DG> >; _Size = int; _Compare = bool (*)(DG&, DG&)]’
/usr/include/c++/4.8/bits/stl_algo.h:5513:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<DG*, std::vector<DG> >; _Compare = bool (*)(DG&, DG&)]’
user.cpp:176:39: required from here
/usr/include/c++/4.8/bits/stl_algo.h:2287:35: error: invalid initialization of reference of type ‘DG&’ from expression of type ‘const DG’
while (__comp(*__first, __pivot))
^
/usr/include/c++/4.8/bits/stl_algo.h:2290:34: error: invalid initialization of reference of type ‘DG&’ from expression of type ‘const DG’
while (__comp(__pivot, *__last))
^
user.cpp: In function ‘int main()’:
user.cpp:92:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("colectie.in", "r", stdin);
^
user.cpp:93:41: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("colectie.out", "w", stdout);
^
user.cpp:95:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &k);
^
user.cpp:160:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &x);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !