
September 30th, 2004, 11:24 AM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
mysterious pow() function
Hi.
I'm a bit confused how to use the pow() function
If I have something like:
Code:
1 const float a=10.1;
2 float b=pow(10.1,0.5);
3 float c=pow(a,0.5);
4 float d=pow(a,2.0);
5 float e=pow(a,2);
I get the following error messages for line 3 (and also for line 4):
Code:
ISO C++ says that `double pow(double, double)' and `float std::pow(float, float)' are ambiguous even
ISO C++ says that `double pow(double, double)' and `float std::pow(float, int)' are ambiguous even
(Compiled using Dev-C++ 4.9.9.0)
Can someone enlighten me, and point out the differences between lines 2 and 3 ? (respectively 4 and 5?)
Thanks for your help,
Spulwurm
|