Borderou de evaluare (job #2743906)
Utilizator | Data | 23 aprilie 2021 17:36:13 | |
---|---|---|---|
Problema | Hashuri | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void push(int)':
main.cpp:26:12: error: request for member 'push_back' in 'h.std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)poz))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
h[poz].push_back(x);
^~~~~~~~~
main.cpp: In function 'void pop(int)':
main.cpp:31:19: error: request for member 'begin' in 'h.std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)poz))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
for(it=h[poz].begin(); it!=h[poz].end(); it++){
^~~~~
main.cpp:31:39: error: request for member 'end' in 'h.std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)poz))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
for(it=h[poz].begin(); it!=h[poz].end(); it++){
^~~
main.cpp:33:28: error: request for member 'end' in 'h.std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)poz))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
*it = *(h[poz].end());
^~~
main.cpp:34:20: error: request for member 'pop_back' in 'h.std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)poz))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
h[poz].pop_back();
^~~~~~~~
main.cpp: In function 'int index(int)':
main.cpp:42:19: error: request for member 'begin' in 'h.std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)poz))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
for(it=h[poz].begin(); it!=h[poz].end(); it++){
^~~~~
main.cpp:42:39: error: request for member 'end' in 'h.std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)poz))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
for(it=h[poz].begin(); it!=h[poz].end(); it++){
^~~
main.cpp: In function 'int main()':
main.cpp:53:32: error: 'x' was not declared in this scope
if(operatie == 1) push(x);
^
main.cpp:54:31: error: 'x' was not declared in this scope
if(operatie == 2) pop(x);
^
main.cpp:56:29: error: 'x' was not declared in this scope
int poz = index(x);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !