Borderou de evaluare (job #2206219)

Utilizator PogonetPogonet Artiom Pogonet Data 21 mai 2018 20:21:56
Problema Suma si numarul divizorilor Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:7:56: error: ‘int div’ redeclared as different kind of symbol int n , a[NMAX] , k , rez = 1 , fin , val , t, x , p , div = 1; ^~~ In file included from /usr/include/c++/6/cstdlib:75:0, from /usr/include/c++/6/ext/string_conversions.h:41, from /usr/include/c++/6/bits/basic_string.h:5417, from /usr/include/c++/6/string:52, from /usr/include/c++/6/bits/locale_classes.h:40, from /usr/include/c++/6/bits/ios_base.h:41, from /usr/include/c++/6/ios:42, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/fstream:38, from user.cpp:1: /usr/include/stdlib.h:788:14: note: previous declaration ‘div_t div(int, int)’ extern div_t div (int __numer, int __denom) ^~~ user.cpp: In function ‘int main()’: user.cpp:38:27: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator*’ div = div * (p + 1); ~~~~^~~~~~~~~ user.cpp:47:15: error: no match for ‘operator<<’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘<unresolved overloaded function type>’) g << div << ' ' << rez << '\n'; ~~^~~~~~ In file included from /usr/include/c++/6/istream:39:0, from /usr/include/c++/6/fstream:38, from user.cpp:1: /usr/include/c++/6/ostream:108:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>] operator<<(__ostream_type& (*__pf)(__ostream_type&)) ^~~~~~~~ /usr/include/c++/6/ostream:108:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&) {aka std::basic_ostream<char>& (*)(std::basic_ostream<char>&)}’ /usr/include/c++/6/ostream:117:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>] operator<<(__ios_type& (*__pf)(__ios_type&)) ^~~~~~~~ /usr/include/c++/6/ostream:117:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&) {aka std::basic_ios<char>& (*)(std::basic_ios<char>&)}’ /usr/include/c++/6/ostream:127:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>] operator<<(ios_base& (*__pf) (ios_base&)) ^~~~~~~~ /usr/include/c++/6/ostream:127:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::ios_base& (*)(std::ios_base&)’ /usr/include/c++/6/ostream:166:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>] operator<<(long __n) ^~~~~~~~ /usr/include/c++/6/ostream:166:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘long int’ /usr/include/c++/6/ostream:170:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>] operator<<(unsigned long __n) ^~~~~~~~ /usr/include/c++/6/ostream:170:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘long unsigned int’ /usr/include/c++/6/ostream:174:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>] operator<<(bool __n) ^~~~~~~~ /usr/include/c++/6/ostream:174:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘bool’

Ceva nu functioneaza?