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

📄 cpp04.cpp

📁 C++参考书
💻 CPP
字号:

// Coded by plusir -- Dec.30.2002.
// Standard C++ Bible -- (P280-11-4)

#include <iostream>
using namespace std ;

class Box
{
	public:
		Box( void ) { }
		Box( int h, int w, int d )
		{ 
			height = h ;
			width = w ;
			depth = d ;
		}

		int volume( void )
		{ return height * width * depth ; }

	private:
		int height ;
		int width ;
		int depth ;
} ;

int main()
{
	Box thisBox( 7, 8, 9 ) ;
	Box otherBox ;

	otherBox = thisBox ;
	int volume = otherBox.volume() ;
	cout << volume << endl ;

	return 0 ;
}

⌨️ 快捷键说明

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