Question: Fix these codes so they are able to debug and compile in Linux Circle.h code below #ifndef CIRCLE _ H #define CIRCLE _ H #include

Fix these codes so they are able to debug and compile in Linux
Circle.h code below
#ifndef CIRCLE_H
#define CIRCLE_H
#include
using namespace std;
class Circle
{
private:
double radius;//radius of the circle
double * area;//area of the circle
double * circumference;//circumferencee of the circle
double pi=3.1415;// the value of pi
public:
Circle(){radius=0;area=new double;area=0;circumference= new double;}
void set_rad(double rad){radius = rad;};
double compute_area()
{*area =(pi*pow(radius,2.0));return *area;};
double compute_circumference()
{*(circumference+1)=2*pi*radius;return *circumference;}
double check_rad(double rad)
{if(rad>0 && rad!=0){return true;}else{return false;}};
~Circle();
};
#endif
circle.cpp code below
#include
#include "circle.h"
using namespace std;
int main()
{
double users_radius;// value to store users given radius value;
Circle * first_circle;// define a pointer to a circle
first_circle = new Circle();// allocate memory for the object and call the constructor
cout<<"This Program computes various metrics of a circle">users_radus;
first_circle->set_rad(users_radius);
cout<<"Area of circle is:"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!