I have this line of code:
int g = modf(ans*power, 1)*10;
And it is giving me the error:
Invalid conversion from \'int\'
I don't see where I am using a pointer : you're not, and that is the problem. Look at the signature of modf:
I don't see where I am using a pointer
modf
double modf( double, double* );
It requires a double* as second argument; you're passing it an int.
double*
int