You basically have the correct idea. You can either write a "canonical"
operator != as:
bool operator !=(Saving const& lhs, Saving const& rhs)
{
}
and then declare a sentinel value (e.g.
Saving sentinel(9999, -1.0)), or you can write an operator that compares
Saving to
int (or any other type):
bool operator !=(Saving const& lhs, int rhs)
{
}
Either method should work.
Note that if you declare
operator !=, it is a good practice to also declare
operator ==