i need to know how to use powers in c++. so if i enter to and then 3 for the power i get 8.

this is what i have so far

```
#include <iostream>
using namespace std;
double power(double,int);
int main()
{
double n;
int p;
cout << "Enter a number ";
cin >> n;
cout << "Enter a power ";
cin >>p;
cout << power(n,p);
return 0;
}
double power(double n, int p)
{
}
```

the function power is the part im having problems with i dont know what to put in it

thank you in advance