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