log function problem

Hi guys,

i am trying to remove 'delta' from this equation:

R = (double)(c*log(k/delta)*pow((double)k, 0.5));

but when i try:

R = (double)(c*log(k)*pow((double)k, 0.5));

i keep getting error C2668: 'log' : ambiguous call to overloaded function

Any ideas on how to solve this!?

k is an integer and log has no overload for an integer argument. The compiler can't decide whether it should convert it to float or double. Write log(float(k))
Thats great, tnx hamsterman!
Topic archived. No new replies allowed.