This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
pow(int , int)
- From: Eduardo Osorio Armenta <e_osorio at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 4 Dec 2002 10:32:43 -0800 (PST)
- Subject: pow(int , int)
- Reply-to: eduardoo at antar dot com dot mx
this send me an error!
for (i = 0; i < 32; i++)
{
cout << "2^" << dec << i << " = 0x" << hex <<
pow(2, i) << endl;
}
exponencial.cpp:19: call of overloaded `pow(int,
int&)' is ambiguous
/usr/include/math.h:60: candidates are: double
pow(double, double)
/usr/include/c++/3.2/cmath:427: long
double std::pow(long
double, int)
/usr/include/c++/3.2/cmath:423: float
std::pow(float, int)
/usr/include/c++/3.2/cmath:419: double
std::pow(double, int)
/usr/include/c++/3.2/cmath:414: long
double std::pow(long
double, long double)
/usr/include/c++/3.2/cmath:401: float
std::pow(float, float)
make: *** [exponencial] Error 1
--------------------------------------------
but this works fine....
for (i = 0; i < 32; i++)
{
cout << "2^" << dec << i << " = 0x" << hex <<
pow(2.0, i) << endl;
}
so my question is :
pow( ) does not support pow(int, int); ?
just :
long double std::pow(long double, int)
float std::pow(float, int)
double std::pow(double, int)
long double std::pow(long double, long double)
float std::pow(float, float)
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com