Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Apress/beginning-cpp20
/ compare
Method
compare
Examples/NoModules/Chapter 12/Ex12_17/Box.h:19–24 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
17
}
18
19
int compare(const Box& box) const
20
{
21
if (volume() < box.volume()) return -1;
22
if (volume() == box.volume()) return 0;
23
return +1;
24
}
25
26
void listBox() const
27
{
Callers
1
main
Function · 0.45
Calls
1
volume
Method · 0.45
Tested by
no test coverage detected