下列代码定义一个圆的类Circle,后面选项中能够正确计算圆面积的代码是()。class Circle{public:void SetR(double r){ radius=r; }double GetArea(){ return 3.14*radius*radius; }private:double radius;};
A. Circle c; cout<<c.GetArea();
B. Circle c; SetR(3.2); cout<<GetArea();
Circle c; c.SetR(3.2);cout<<c.GetArea();
D. Circle c, *p=c;p->SetR(3.2); p->GetArea();