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

Function main

Examples/NoModules/Chapter 14/Ex14_03/Ex14_03.cpp:5–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "Carton.h"
4
5int main()
6{
7 // Declare and initialize a Carton object
8 Carton carton{ 20.0, 30.0, 40.0, "Expanded polystyrene" };
9 std::cout << std::endl;
10
11 Carton cartonCopy{ carton }; // Use copy constructor
12 std::cout << std::endl;
13
14 std::cout << "Volume of carton is " << carton.volume() << std::endl
15 << "Volume of cartonCopy is " << cartonCopy.volume() << std::endl;
16}

Callers

nothing calls this directly

Calls 1

volumeMethod · 0.45

Tested by

no test coverage detected