I have this line of code:
int g = modf(ans*power, 1)*10;
And it is giving me the error:
Invalid conversion from ‘int’ to ‘double*’.
ans is defined as:
double ans = 1.0/d;
power is defined as:
int power = pow(10,x);
and the x that power is using is defined as:
for(int x = 0; x < 50; x++) {
I don’t see where I am using a pointer. If you need more code just ask.
(I have also tried making the line of code that causes the error:
int g = (int)modf(ans*power, 1)*10;
but that did not work either).
modf(ans*power, 1)is baddouble smthng = 1.0; modf(ans*power, &smthng)is good.http://linux.die.net/man/3/modf