box.h
来自「Visual C++ 2005的源代码」· C头文件 代码 · 共 24 行
H
24 行
// Box.h in Ex9_03
#pragma once
#include <iostream>
using std::cout;
using std::endl;
class CBox
{
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"; }
//Function to calculate the volume of a CBox object
double Volume() const
{ return m_Length*m_Width*m_Height; }
private:
double m_Length;
double m_Width;
double m_Height;
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?