Borderou de evaluare (job #2138110)

Utilizator mihaigrozaGroza Mihai mihaigroza Data 21 februarie 2018 12:57:14
Problema Suma si numarul divizorilor Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:10:11: error: ‘int div’ redeclared as different kind of symbol int i,j,s,div,n,p,ii,t,p1,h,aux; ^ In file included from /usr/include/c++/5/cstdlib:72:0, from /usr/include/c++/5/ext/string_conversions.h:41, from /usr/include/c++/5/bits/basic_string.h:5249, from /usr/include/c++/5/string:52, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, 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:21:12: error: overloaded function with no contextual type information div=1; ^ user.cpp:35:25: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator*’ div=div*p; ^ user.cpp:44:21: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator*’ div=div*2; ^ user.cpp:48:10: error: no match for ‘operator<<’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘<unresolved overloaded function type>’) g<<div<<" "<<s%9973<<endl; ^ In file included from /usr/include/c++/5/iostream:39:0, from user.cpp:1: /usr/include/c++/5/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++/5/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++/5/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++/5/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++/5/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++/5/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++/5/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++/5/ostream:166:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘long int’ /usr/include/c++/5/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) ^

Ceva nu functioneaza?