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

Function print

Exercises/NoModules/Chapter 16/Exer16_06/Exer16_06.cpp:93–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void print(std::ostream& stream, const Customer& customer)
94{
95 stream << customer.toString() << std::endl;
96 if (std::cout.fail())
97 {
98 std::cout.clear();
99 throw std::runtime_error("Failed to output customer");
100 }
101}

Callers 1

mainFunction · 0.70

Calls 2

toStringMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected