box.cpp

来自「Since the field of object oriented progr」· C++ 代码 · 共 32 行

CPP
32
字号
                                   // Chapter 5 - Program 8 - BOX.CPP
#include "box.h"


box::box(void)        //Constructor implementation
{
   length = 8;
   width = 8;
}


// This method will set a box size to the two input parameters
void box::set(int new_length, int new_width)
{
   length = new_length;
   width = new_width;
}


box::~box(void)       //Destructor
{
   length = 0;
   width = 0;
}




// Result of execution
//
// This implementation file cannot be executed

⌨️ 快捷键说明

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