prog.cpp:5:12: error: ‘double y1’ redeclared as different kind of symbol
double x1, y1, x2, y2;
^
In file included from /usr/include/features.h:371:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39,
from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426,
from /usr/include/c++/4.8/iostream:38,
from prog.cpp:1:
/usr/include/i386-linux-gnu/bits/mathcalls.h:242:1: error: previous declaration of ‘double y1(double)’
__MATHCALL (y1,, (_Mdouble_));
^
prog.cpp: In function ‘int main()’:
prog.cpp:10:18: warning: right operand of comma operator is a reference, not call, to function ‘y1’ [-Waddress]
cin >> x1, y1;
^
prog.cpp:10:18: warning: right operand of comma operator has no effect [-Wunused-value]
prog.cpp:12:18: warning: right operand of comma operator has no effect [-Wunused-value]
cin >> x2, y2;
^
prog.cpp:14:76: error: invalid operands of types ‘double’ and ‘double(double)throw ()’ to binary ‘operator-’
cout << "Distance between points: " << sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
^