Borderou de evaluare (job #3174599)
Utilizator | Data | 24 noiembrie 2023 23:27:49 | |
---|---|---|---|
Problema | Bool | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:14:5: error: 'int index' redeclared as different kind of entity
14 | int index=0;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/12.2.1/cstring:42,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:48,
from main.cpp:1:
/usr/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)'
61 | index (const char *__s, int __c) __THROW
| ^~~~~
main.cpp: In function 'int factor()':
main.cpp:22:9: error: no match for 'operator[]' (operand types are 'std::vector<int>' and '<unresolved overloaded function type>')
22 | if(v[index]==2)
| ^
In file included from /usr/include/c++/12.2.1/vector:64,
from /usr/include/c++/12.2.1/functional:62,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:71:
/usr/include/c++/12.2.1/bits/stl_vector.h:1121:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]'
1121 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1121:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
1121 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1140:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = int; _Alloc = std::allocator<int>; const_reference = const int&; size_type = long unsigned int]'
1140 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1140:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
1140 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
main.cpp:24:14: error: no post-increment operator for type
24 | index++;
| ^~
main.cpp:27:14: error: no match for 'operator[]' (operand types are 'std::vector<int>' and '<unresolved overloaded function type>')
27 | else if(v[index]=='(')
| ^
/usr/include/c++/12.2.1/bits/stl_vector.h:1121:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]'
1121 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1121:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
1121 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1140:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = int; _Alloc = std::allocator<int>; const_reference = const int&; size_type = long unsigned int]'
1140 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1140:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
1140 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
main.cpp:29:14: error: no post-increment operator for type
29 | index++;
| ^~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !