I am getting this annoying error and I don\'t know why =( ! This is the question , I solved it but I am having a problem with the constructor.
Write a
Well, then add one :)
Circle() : radius(0.0) {}
This line invokes a constructor with no arguments (known as default constructor):
Circle C;
The only constructor you have defined is:
Circle(double);
Hopefully this should point you in the right direction.
A default constructor is one without any parameters. Normally, it is provided for you. But if you explicitly define any other constructor, then it is not. So you have to define it yourself, or not use it. You are using it when you create an object in main, like this:
Circle C;
So, either define a default constructor, or don't use it.
You should define a constructor with no parameters called default constructor. You can initialize related members to the default values.
Circle::Circle()
{
radius = 0.0
}