Borderou de evaluare (job #2622132)
Utilizator | Data | 31 mai 2020 15:58:26 | |
---|---|---|---|
Problema | Curatenie | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:8:5: error: 'int index' redeclared as different kind of symbol
int index;
^~~~~
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 vampiri(int, int)':
main.cpp:17:10: error: no post-increment operator for type
index++;
^~
main.cpp:18:14: error: no match for 'operator[]' (operand types are 'std::vector<int>' and '<unresolved overloaded function type>')
nod = RSD[index];
^
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 = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; 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<int>::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 = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; 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<int>::size_type {aka long unsigned int}'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !