Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Apress/beginning-cpp20
/ print
Function
print
Exercises/Modules/Chapter 18/Soln18_05/Soln18_05.cpp:91–99 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
89
}
90
91
void print(std::ostream& stream, const Customer& customer)
92
{
93
stream << customer.toString() << std::endl;
94
if (std::cout.fail())
95
{
96
std::cout.clear();
97
throw std::runtime_error(
"Failed to output customer"
);
98
}
99
}
Callers
1
main
Function · 0.70
Calls
2
toString
Method · 0.45
clear
Method · 0.45
Tested by
no test coverage detected