Borderou de evaluare (job #1260929)

Utilizator SzymonSidorSzymonSidor SzymonSidor Data 11 noiembrie 2014 19:30:22
Problema Shift Status done
Runda Arhiva Monthly Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:23:29: error: no matching function for call to ‘std::vector<std::pair<int, int> >::push_back(int&)’ loc[pi1].push_back(i); ^ user.cpp:23:29: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from /usr/include/c++/4.8/bits/random.h:34, from /usr/include/c++/4.8/random:50, from /usr/include/c++/4.8/bits/stl_algo.h:65, from /usr/include/c++/4.8/algorithm:62, from user.cpp:1: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>] push_back(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from ‘int’ to ‘const value_type& {aka const std::pair<int, int>&}’ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>] push_back(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from ‘int’ to ‘std::vector<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}’ user.cpp:24:34: error: no matching function for call to ‘std::vector<std::pair<int, int> >::push_back(int)’ loc[pi2].push_back(26 + i); ^ user.cpp:24:34: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from /usr/include/c++/4.8/bits/random.h:34, from /usr/include/c++/4.8/random:50, from /usr/include/c++/4.8/bits/stl_algo.h:65, from /usr/include/c++/4.8/algorithm:62, from user.cpp:1: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>] push_back(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from ‘int’ to ‘const value_type& {aka const std::pair<int, int>&}’ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>] push_back(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from ‘int’ to ‘std::vector<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}’ user.cpp:33:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] int loc1 = loc[c][0], loc2 = loc[c][1]; ^ user.cpp:33:28: error: cannot convert ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}’ to ‘int’ in initialization int loc1 = loc[c][0], loc2 = loc[c][1]; ^ user.cpp:33:43: warning: array subscript has type ‘char’ [-Wchar-subscripts] int loc1 = loc[c][0], loc2 = loc[c][1]; ^ user.cpp:33:46: error: cannot convert ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}’ to ‘int’ in initialization int loc1 = loc[c][0], loc2 = loc[c][1]; ^

Ceva nu functioneaza?