prog.cpp:23:10: error: 'int y0' redeclared as different kind of symbol
int n,x0,y0,xi,yi;
^
In file included from /usr/include/features.h:374:0,
from /usr/include/assert.h:35,
from /usr/include/c++/4.9/cassert:43,
from /usr/include/i386-linux-gnu/c++/4.9/bits/stdc++.h:33,
from prog.cpp:1:
/usr/include/i386-linux-gnu/bits/mathcalls.h:240:1: note: previous declaration 'double y0(double)'
__MATHCALL (y0,, (_Mdouble_));
^
prog.cpp: In function 'int main()':
prog.cpp:38:20: warning: pointer to a function used in arithmetic [-Wpointer-arith]
int a = y0-yi;
^
prog.cpp:38:19: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
int a = y0-yi;
^
prog.cpp:40:18: error: wrong type argument to unary minus
int c = -y0*(x0-xi) + x0*(y0-yi);
^
prog.cpp:40:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
int c = -y0*(x0-xi) + x0*(y0-yi);
^
prog.cpp:40:40: error: invalid operands of types 'int' and 'double (*)(double) throw ()' to binary 'operator*'
int c = -y0*(x0-xi) + x0*(y0-yi);
^