calculator in C++

Hello,
I am trying to write a C++ code to calculate big numbers, I do need to use the pow function in C++, however my code fails, can anyone tell me if there is any changes in the way pow function is used in visual studio 2010?
even the simple pow(2.1,3.2) does not work.
I am trying to write the code as I was unable to find any calculator which could calculate the result of a 5 digit number to the power of another 5 digit number.
Can anyone let me know if it is possible in C++ and if it is what is the issue as I am unable to run the code.
Your advice is very appreciated
Many Thanks
Are you including the header file math.h when using your pow function?

Also, anything is possible in C++! :)

But seriously, to answer your question, it is definitely possible to calculate large numbers by using the pow function, as long as it stays in the range of your input (i.e. integers, doubles) .
Thanks for your reply. yes I have even tried the below code and still doesn't work, it has been over a year that I haven't write any code and it is the first time using Visual Studio 2010, thought there might be some changes in the new version.

#include <cstdio>
#include <math.h>
using namespace std;
int main ()
{
printf ("7 ^ 3 = %lf\n", pow (7.0,3));

return 0;
}

or this:
#include <iostream>
#include <math.h>
double pow(double x, int y);
using namespace std;

int main()
{
double m= pow(7.0,3.0);
cout << m;
}
pow doesn't take an int and a double. it's
double pow(double, double);
also, don't redeclare stuff that's in the standard headers.
If it doesn't work, make sure that you're linking to the -lm library.
Topic archived. No new replies allowed.