problem with simple program
Code:
//this program will calculate the area of a circle.
#include <iostream>
#include <iomanip>
#include <cstdlib>
using std::cout;
using std::cin;
int main()
{
double pi = "3.14";
double radius = "0.0";
double area = "0.0";
cout <<"Please enter the radius of a circle: ";
cin >> radius;
area = pi * radius * radius ; //calculates a circle's area
cout <<"\n\nThe area is: " << area;
cout <<"\n\n";
system("PAUSE");
return 0;
}
The problem is this:
Code:
11 C:\Dev-Cpp\areaOfCircle.cpp cannot convert `const char*' to `double' in initialization
For the life of me I can't figure out what's wrong.