⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 carton.h

📁 一本语言类编程书籍
💻 H
字号:
// 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 which can also act as default constructor - 
    //            calls default base constructor automatically
    Carton(const char* pStr = "Cardboard");
    
    // Constructor explicitly calling the base constructor
    Carton(double lv, double wv, double hv, const char* pStr = "Cardboard");

	// Copy constructor
    Carton(const Carton& aCarton);              

    ~Carton();                                  // Destructor

    // Function to calculate the volume of a Carton object
    double volume() const;

  protected:
    char* pMaterial;
};
#endif 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -