im a beginner and using C++ 2008 edition and this pow function isnt working on it although its working perfectly ob C++6. please help. THIS IS PART OF THE CODE:
#include<iostream>
#include<cmath>
using namespace std;
int det (int **oldray,int order)
{
int deter=0,i,k;
int **newray;
newray=new int*[order-1];
for( i=0;i<order;i++)
newray[i]=new int [order-1];
if(order==2)
return (oldray[0][0]*oldray[1][1])-(oldray[0][1]*oldray[1][0]);
else
{
for(i=0;i<=0;i++)
{
for( k=0;k<order;k++)
{
cout<<i<<k<<": "<<pow(-1,i+k)*oldray[i][k]<<endl;
cpy(oldray,newray,i,k,order);
deter=deter+(pow(-1,i+k)*oldray[i][k] * det(newray,order-1));
cout<<" determinant is "<<deter <<endl;
}
}
}
return deter;
}
THESE ARE THE ERRORS:
1>c:\users\ikc\documents\visual studio 2008\projects\inv2\inv2\inv2.cpp(145) : error C2668: 'pow' : ambiguous call to overloaded function
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): could be 'long double pow(long double,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): or 'float pow(float,int)'
1> c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): or 'double pow(double,int)'
1> while trying to match the argument list '(int, int)'