📄 box.h
字号:
// Box.h in Ex9_05
#pragma once
#include <iostream>
using std::cout;
using std::endl;
class CBox // Base class definition
{
public:
// Base class constructor
CBox(double lv = 1.0, double wv = 1.0, double hv = 1.0):
m_Length(lv), m_Width(wv), m_Height(hv)
{ cout << endl << "CBox constructor called"; }
// Copy constructor
CBox(const CBox& initB)
{
cout << endl << "CBox copy constructor called";
m_Length = initB.m_Length;
m_Width = initB.m_Width;
m_Height = initB.m_Height;
}
// CBox destructor - just to track calls
~CBox()
{ cout << "CBox destructor called" << endl; }
protected:
double m_Length;
double m_Width;
double m_Height;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -