MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / Box

Method Box

Examples/Modules/Chapter 12/Ex12_14/Box.cpp:4–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import <iostream>;
3
4Box::Box(double length, double width, double height) // Constructor definition
5 : m_length{length}, m_width{width}, m_height{height}
6{
7 ++s_object_count;
8 std::cout << "Box constructor 1 called." << std::endl;
9}
10
11Box::Box(double side) : Box{side, side, side} // Constructor for a cube
12{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected