Borderou de evaluare (job #2623718)

Utilizator andreizZenoveiov Andrei andreiz Data 3 iunie 2020 17:08:38
Problema Int Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:33:13: error: conflicting declaration 'int f' int n,i,j,r,f; ^ main.cpp:7:10: note: previous declaration as 'std::ifstream f' ifstream f("int.in"); ^ main.cpp: In function 'int main()': main.cpp:51:20: error: 'compara' was not declared in this scope sort(v+1,v+n+1,compara); ^~~~~~~ main.cpp:53:12: error: no match for 'operator=' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'long long int') f=v[1].c2; ^~ In file included from main.cpp:1:0: /usr/include/c++/6/fstream:543:7: note: candidate: std::basic_ifstream<_CharT, _Traits>& std::basic_ifstream<_CharT, _Traits>::operator=(std::basic_ifstream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>] operator=(basic_ifstream&& __rhs) ^~~~~~~~ /usr/include/c++/6/fstream:543:7: note: no known conversion for argument 1 from 'long long int' to 'std::basic_ifstream<char>&&' main.cpp:61:19: error: no match for 'operator>=' (operand types are 'long long int' and 'std::ifstream {aka std::basic_ifstream<char>}') if(v[i].c1>=f) ~~~~~~~^~~ main.cpp:61:19: note: candidate: operator>=(long long int, int) <built-in> main.cpp:61:19: note: no known conversion for argument 2 from 'std::ifstream {aka std::basic_ifstream<char>}' to 'int' In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0, from /usr/include/c++/6/bits/char_traits.h:39, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/fstream:38, from main.cpp:1: /usr/include/c++/6/bits/stl_pair.h:466:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator>=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) ^~~~~~~~ /usr/include/c++/6/bits/stl_pair.h:466:5: note: template argument deduction/substitution failed: main.cpp:61:21: note: mismatched types 'const std::pair<_T1, _T2>' and 'long long int' if(v[i].c1>=f) ^ In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0, from /usr/include/c++/6/bits/char_traits.h:39, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/fstream:38, from main.cpp:1: /usr/include/c++/6/bits/stl_iterator.h:322:5: note: candidate: template<class _Iterator> bool std::operator>=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) operator>=(const reverse_iterator<_Iterator>& __x, ^~~~~~~~ /usr/include/c++/6/bits/stl_iterator.h:322:5: note: template argument deduction/substitution failed: main.cpp:61:21: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'long long int' if(v[i].c1>=f) ^ In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0, Non zero exit status: 1

Ceva nu functioneaza?