Job 20651

Owner
Alexandru Lungu
Problem
Circle
Source
0.39KB
Result
Compile error (Non-zero exit status: 1)

Compiler output

prog.cpp:6:18: error: 'int y1' redeclared as different kind of symbol
 int x, y, n, x1, y1, r, nr, i, d;
                  ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/os_defines.h:39,
                 from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/c++config.h:430,
                 from /usr/include/c++/4.9/iostream:38,
                 from prog.cpp:1:
/usr/include/arm-linux-gnueabihf/bits/mathcalls.h:241:1: note: previous declaration 'double y1(double)'
 __MATHCALL (y1,, (_Mdouble_));
 ^
prog.cpp: In function 'int main()':
prog.cpp:15:11: error: cannot bind 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&'
     cin>>n>>x1>>y1>>r;
           ^
In file included from /usr/include/c++/4.9/iostream:40:0,
                 from prog.cpp:1:
/usr/include/c++/4.9/istream:872:5: note: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = double(double) throw ()]'
     operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
     ^
prog.cpp:19:28: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
         d=Dist(x1, y1, x, y);
                            ^
prog.cpp:8:5: note: initializing argument 2 of 'int Dist(int, int, int, int)'
 int Dist(int x1, int y1, int x2, int y2)
     ^

Questions?

Sponsors Gold