carton.h
来自「一本语言类编程书籍」· C头文件 代码 · 共 23 行
H
23 行
// Carton.h - defines the Carton class with the Box class as base
#ifndef CARTON_H
#define CARTON_H
#include "Box.h" // For Box class definition
class Carton : public Box {
public:
// Constructor explicitly calling the base constructor
Carton(double lv = 1, double wv = 1, double hv = 1,
const char* pStr = "Cardboard",
double dense = 0.125, double thick = 0.2);
~Carton(); // Destructor
double getWeight() const; // "Get carton weight" function
protected:
char* pMaterial; // Carton material
double thickness; // Material thickness inches
double density; // Material density in pounds/cubic inch
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?