Class cylinder public void setcylinder(doubler, double h) double getradiuso double getheighto double volume double surface areao private double radius double height 注:在类内不允许对声明的数据成员进行初始化Class Cylinder { public : void setcylinder(double r,double h); double getradius(); double getheight(); double volume(); double surface_area(); private: double radius; double height; }; 注:在类内不允许对声明的数据成员进行初始化