Borderou de evaluare (job #1517353)

Utilizator alex_HarryBabalau Alexandru alex_Harry Data 4 noiembrie 2015 09:39:43
Problema Oite Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘std::vector<int>::iterator Find2(int)’: user.cpp:16:16: error: request for member ‘first’ in ‘* it.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator-><int*, std::vector<int> >()’, which is of non-class type ‘int’ if(it->first==value) ^ user.cpp: In function ‘void Insert2(int)’: user.cpp:26:50: error: no matching function for call to ‘std::vector<int>::push_back(std::pair<int, int>)’ V2[List].push_back(make_pair(value,1)); ^ user.cpp:26:50: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = 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 ‘std::pair<int, int>’ to ‘const value_type& {aka const 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 = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = 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 ‘std::pair<int, int>’ to ‘std::vector<int>::value_type&& {aka int&&}’ user.cpp:28:13: error: request for member ‘second’ in ‘* it.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator-><int*, std::vector<int> >()’, which is of non-class type ‘int’ it->second++; ^ user.cpp: In function ‘std::vector<int>::iterator Find(int)’: user.cpp:36:16: error: request for member ‘first’ in ‘* it.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator-><int*, std::vector<int> >()’, which is of non-class type ‘int’ if(it->first==value) ^ user.cpp: In function ‘void Insert(int)’: user.cpp:46:49: error: no matching function for call to ‘std::vector<int>::push_back(std::pair<int, int>)’ V[List].push_back(make_pair(value,1)); ^ user.cpp:46:49: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = 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 ‘std::pair<int, int>’ to ‘const value_type& {aka const 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 = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = 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 ‘std::pair<int, int>’ to ‘std::vector<int>::value_type&& {aka int&&}’ user.cpp:48:13: error: request for member ‘second’ in ‘* it.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator-><int*, std::vector<int> >()’, which is of non-class type ‘int’ it->second++; ^ user.cpp: In function ‘void Delete(int)’: user.cpp:54:12: error: ‘second’ was not declared in this scope if(it>second>1) ^ user.cpp:55:9: error: request for member ‘second’ in ‘* it.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator-><int*, std::vector<int> >()’, which is of non-class type ‘int’ it->second--;

Ceva nu functioneaza?