cylinder.h
来自「潭浩强 C++教程 红皮封面的配套相关习题书的习题答案。 1~14章全有」· C头文件 代码 · 共 16 行
H
16 行
//习题12.1中的cylinder.h头文件
//CYLINDER.H
#include "circle.h"
class Cylinder:public Circle
{public:
Cylinder (float x=0,float y=0,float r=0,float h=0);
void setHeight(float);
float getHeight() const;
float area() const;
float volume() const;
friend ostream& operator<<(ostream&,const Cylinder&);
protected:
float height;
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?