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

Function main

Examples/NoModules/Chapter 14/Ex14_07B/Ex14_07B.cpp:6–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "CerealPack.h" // For the CerealPack class
5
6int main()
7{
8 CerealPack cornflakes{ 8.0, 3.0, 10.0, "Cornflakes" };
9
10 std::cout << "cornflakes volume is " << cornflakes.volume() << std::endl
11 << "cornflakes weight is " << cornflakes.getWeight() << std::endl;
12}

Callers

nothing calls this directly

Calls 2

volumeMethod · 0.45
getWeightMethod · 0.45

Tested by

no test coverage detected