I am attempting to create a program that calculates the area and circumference of a circle. But I keep getting an error that states
error: invalid operands to binary expression ('const char *' and 'double')
on two lines and I don't know how to solve it here is the code:
int main()
{
const double MY_PI = 3.14159265;
double radius;
cout << "Program calculates the area and circumference of a circle" << endl;
cout << "enter circle radius" << endl;
cin >> radius;
double area = MY_PI * (radius*radius);
double circumference = 2 * MY_PI*radius;
//these are the lines with errors
double AREA_STR = "Area of circle with radius " + radius + " is " + area;
double CIRCUM_STR = "Circumference of a circle with radius " + radius + " is " + circumference;
cout << AREA_STR << endl;
cout << CIRCUM_STR << endl;
return 0;
}