Forgot to post the code.. sorry.. I am still getting these errors..
Code:
for (i = 1; i < n; ++i)
{
elements = (pow(-1,i-1))*(pow(i,2));
sum += elements;
cout << i << " + ";
}
elements = (pow(-1,i-1))*(pow(i,2));
sum += elements;
cout << i << " = " << sum << endl;
Code:
error C2668: 'pow' : ambiguous call to overloaded function
1> c:\program files\microsoft visual studio 8\vc\include\math.h(575): could be 'long double pow(long double,int)'
1> c:\program files\microsoft visual studio 8\vc\include\math.h(527): or 'float pow(float,int)'
1> c:\program files\microsoft visual studio 8\vc\include\math.h(489): or 'double pow(double,int)'
1> while trying to match the argument list '(int, int)'