Borderou de evaluare (job #2747653)
Utilizator | Data | 29 aprilie 2021 15:26:02 | |
---|---|---|---|
Problema | Sea | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:15:7: error: 'int index' redeclared as different kind of symbol
int i,index,j,n,m;
^~~~~
In file included from /usr/include/c++/6/cstring:42:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:48,
from main.cpp:1:
/usr/include/string.h:477:1: note: previous declaration 'const char* index(const char*, int)'
index (const char *__s, int __c) __THROW
^~~~~
main.cpp: In function 'int main()':
main.cpp:31:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(j=0; j<vapoare.size(); j++)
~^~~~~~~~~~~~~~~
main.cpp:36:27: error: overloaded function with no contextual type information
for(index=j; index>0; index--)
^
main.cpp:36:35: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
for(index=j; index>0; index--)
~~~~~^~
main.cpp:36:44: error: no post-decrement operator for type
for(index=j; index>0; index--)
^~
main.cpp:37:37: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
if(vapoare[index-1].dist > vapoare[index].dist)
~~~~~^~
main.cpp:37:55: error: no match for 'operator[]' (operand types are 'std::vector<date>' and '<unresolved overloaded function type>')
if(vapoare[index-1].dist > vapoare[index].dist)
^
In file included from /usr/include/c++/6/vector:64:0,
from /usr/include/c++/6/queue:61,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86,
from main.cpp:1:
/usr/include/c++/6/bits/stl_vector.h:780:7: note: candidate: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = date; _Alloc = std::allocator<date>; std::vector<_Tp, _Alloc>::reference = date&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]
operator[](size_type __n) _GLIBCXX_NOEXCEPT
^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:780:7: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<date>::size_type {aka long unsigned int}'
/usr/include/c++/6/bits/stl_vector.h:795:7: note: candidate: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = date; _Alloc = std::allocator<date>; std::vector<_Tp, _Alloc>::const_reference = const date&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]
operator[](size_type __n) const _GLIBCXX_NOEXCEPT
^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:795:7: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<date>::size_type {aka long unsigned int}'
main.cpp:39:37: error: no match for 'operator[]' (operand types are 'std::vector<date>' and '<unresolved overloaded function type>')
swap(vapoare[index],vapoare[index-1]);
^
In file included from /usr/include/c++/6/vector:64:0,
from /usr/include/c++/6/queue:61,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86,
from main.cpp:1:
/usr/include/c++/6/bits/stl_vector.h:780:7: note: candidate: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = date; _Alloc = std::allocator<date>; std::vector<_Tp, _Alloc>::reference = date&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]
operator[](size_type __n) _GLIBCXX_NOEXCEPT
^~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !