I have 2 integer variables which I want to multiply then find the square root (the geometric mean). This result needs to be saved in a double variable.
I have tried typecasting them, but something about my function isn't working right. I always get this error
At first I thought I was typecasting wrong, but when I removed all of that and simply tried to do sqrt on a single double variable, I still hit the error.
Undefined first referenced
symbol in file
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
I don't get the error if I do sqrt on a number.
double d, e;
d = 3.2;
e = sqrt(d);
I have included math.h.
e = sqrt(3.2);