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

Method compare

Exercises/NoModules/Chapter 12/Soln12_05/Integer.cpp:35–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35int Integer::compare(const Integer& obj) const
36{
37 if (m_value < obj.m_value)
38 return -1;
39 else if (m_value == obj.m_value)
40 return 0;
41 else
42 return 1;
43}
44
45void Integer::printCount()
46{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected