Borderou de evaluare (job #1512270)

Utilizator badea_adi1999Badea Adrian Catalin badea_adi1999 Data 27 octombrie 2015 21:01:53
Problema Colectie Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:16:26: error: ‘std::vector<int>::iterator y1’ redeclared as different kind of symbol vector <int> :: iterator y1; ^ In file included from /usr/include/features.h:357:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420, from /usr/include/c++/4.8/cstdio:41, from user.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:243:1: error: previous declaration of ‘double y1(double)’ __MATHCALL (y1,, (_Mdouble_)); ^ user.cpp: In function ‘void generatefirst(int, int*, std::vector<int>)’: user.cpp:90:11: error: assignment of function ‘double y1(double)’ y1=y.end();y1--; ^ user.cpp:90:11: error: cannot convert ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ to ‘double(double)throw ()’ in assignment user.cpp:90:22: error: ISO C++ forbids decrementing a pointer of type ‘double (*)(double)throw ()’ [-fpermissive] y1=y.end();y1--; ^ user.cpp:90:22: error: lvalue required as decrement operand user.cpp:91:19: error: no matching function for call to ‘std::vector<int>::erase(double (&)(double)throw ())’ y.erase(y1); ^ user.cpp:91:19: note: candidates are: In file included from /usr/include/c++/4.8/vector:69:0, from user.cpp:2: /usr/include/c++/4.8/bits/vector.tcc:134:5: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*] vector<_Tp, _Alloc>:: ^ /usr/include/c++/4.8/bits/vector.tcc:134:5: note: no known conversion for argument 1 from ‘double(double)throw ()’ to ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ /usr/include/c++/4.8/bits/vector.tcc:146:5: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*] vector<_Tp, _Alloc>:: ^ /usr/include/c++/4.8/bits/vector.tcc:146:5: note: candidate expects 2 arguments, 1 provided user.cpp:98:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (t=0;t<y.size();t++) ^ user.cpp: In function ‘void binarysearch(int*, std::vector<int>)’: user.cpp:133:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (t=0;t<z.size();t++) ^ user.cpp:135:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (t=0;t<x[mid].s.size();t++) ^ user.cpp: In function ‘void generatesecond(int, int*, std::vector<int>)’: user.cpp:150:11: error: assignment of function ‘double y1(double)’ y1=z.end();y1--; ^ user.cpp:150:11: error: cannot convert ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ to ‘double(double)throw ()’ in assignment user.cpp:150:22: error: ISO C++ forbids decrementing a pointer of type ‘double (*)(double)throw ()’ [-fpermissive]

Ceva nu functioneaza?