Borderou de evaluare (job #1917186)

Utilizator Bot32King Max Bot32 Data 9 martie 2017 11:29:14
Problema Infasuratoare convexa Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:12:7: error: ‘int index’ redeclared as different kind of symbol int n,index; ^ In file included from /usr/include/c++/4.8/cstring:42:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:48, from user.cpp:1: /usr/include/string.h:482:1: error: previous declaration of ‘const char* index(const char*, int)’ index (__const char *__s, int __c) __THROW ^ user.cpp: In function ‘int main()’: user.cpp:35:18: error: overloaded function with no contextual type information index=i; ^ user.cpp:38:16: error: no match for ‘operator[]’ (operand types are ‘std::vector<std::pair<double, double> >’ and ‘<unresolved overloaded function type>’) swap(v[1],v[index]); ^ user.cpp:38:16: 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 /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from user.cpp:1: /usr/include/c++/4.8/bits/stl_vector.h:770:7: note: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::pair<double, double>; _Alloc = std::allocator<std::pair<double, double> >; std::vector<_Tp, _Alloc>::reference = std::pair<double, double>&; std::vector<_Tp, _Alloc>::size_type = unsigned int] operator[](size_type __n) ^ /usr/include/c++/4.8/bits/stl_vector.h:770:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::vector<std::pair<double, double> >::size_type {aka unsigned int}’ /usr/include/c++/4.8/bits/stl_vector.h:785:7: note: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = std::pair<double, double>; _Alloc = std::allocator<std::pair<double, double> >; std::vector<_Tp, _Alloc>::const_reference = const std::pair<double, double>&; std::vector<_Tp, _Alloc>::size_type = unsigned int] operator[](size_type __n) const ^ /usr/include/c++/4.8/bits/stl_vector.h:785:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::vector<std::pair<double, double> >::size_type {aka unsigned int}’ user.cpp:49:44: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("infasuratoare.out","w",stdout); ^

Ceva nu functioneaza?