use of undeclared identifier 'pow'

i'm just doing practice problems in the book and i typed this code and tried to run it but it said semantic issue because of use of undeclared identifier 'pow'

#include <iostream>
using namespace std;

int main()
{
const double PI = 3.1415;
double area, radius;

cout << "This program calculates the area of a cirlce. \n";
cout << "What is the radius of the circle. \n";
cin >> radius;
area = PI * pow(radius, 2.0);
cout << "The area is \n" << area << endl;
return 0;

}

where is the error??
#include <cmath>
you need to include the math header from c.

In C++ it is in <cmath> (all c headers are preceded with a "c")
Topic archived. No new replies allowed.