i have the following code:
When I try compiling with gcc on a linux mint distribution, I get the following warning:
float z(float x,float y)
g = -x*x + -y*y + 2;
x = 0;
y = 0;
s = z(x,y);
Lab5Exercise1.c: In function ‘z’:
Lab5Exercise1.c:11: warning: format ‘%f’ expects type ‘double’, but argument 2 has type ‘double *’
Since it is just a warning, an output file was created which returns 0.000000 when it should be 2 if my math is correct.
Before this, i had a loop to test several coordinates pair into the function, but the returned values where really off from where they should be, so i made this basic test code.
Thx in advance, Donaldgx