关于C++的类问题
#include <iostream.h>const double p=3.14;
class circle {
double length,area,r;
double length (double x);
double area (double x);
public:
length(double x)
{ double l;
l=2*p*r;
reture l;
}
area (double x)
{ double s;
s=P*r*r;
reture s;
}
void main ()
{
double r;
cin<<r;
length=length (r);
area=area(r);
cout>>"length=">>length>>endl;
cout >>"area=">>area>>endl;
}