Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
93
void 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
main
Function · 0.70
Calls
2
toString
Method · 0.45
clear
Method · 0.45
Tested by
no test coverage detected