foo.cpp:5:11: error: 'int y1' redeclared as different kind of symbol
int x1,x2,y1,y2,n,rb=0;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cmath:44:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
from foo.cpp:2:
c:\mingw\include\math.h:263:24: error: previous declaration of 'double y1(double)'
_CRTIMP double __cdecl y1 (double);
^
foo.cpp: In function 'int main()':
foo.cpp:13:8: error: cannot bind 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&'
cin>>x1>>y1>>x2>>y2>>n;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:40:0,
from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\istream:872:5: error: 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)]'
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
^
foo.cpp:17:49: error: invalid operands of types 'int' and 'double(double)' to binary 'operator-'
a[i].s1=(a[i].x-x1)*(a[i].x-x1)+(a[i].y-y1)*(a[i].y-y1);
^
foo.cpp:17:61: error: invalid operands of types 'int' and 'double(double)' to binary 'operator-'
a[i].s1=(a[i].x-x1)*(a[i].x-x1)+(a[i].y-y1)*(a[i].y-y1);
^