Skip to main content

Practice ยท 1 of 2

Arithmetic and comparison for Money

Implement class Money (private long cents_;, explicit Money(long), long cents() const) and, as free functions, operator+, operator-, operator==, and operator< over Money.

Difficulty: intermediate

Back to lesson: Practice: Operator overloading