here's my function
double Circle::calcPerimeter() const
{
return perimeter = 2 * radius * 3.1425;
}
on visual c++ i get this error....
error C2166: l-value specifies const object
any ideas......?
here's my function
double Circle::calcPerimeter() const
{
return perimeter = 2 * radius * 3.1425;
}
on visual c++ i get this error....
error C2166: l-value specifies const object
any ideas......?
Maybe this'll work
double Circle::calcPerimeter()
{
return 2 * radius * 3.1425;
}
its for an assignment..which the requires the function to be a const....using the variable name perimeter.
what about:
const double Circle::calcPerimeter()
{
return perimeter = 2 * radius * 3.1425;
}