setBalance’s parameter is named balance – the same as the member it’s supposed to update. This is deliberate:
it’s the exact situation from the lesson where this-> stops being optional. Write this->balance to mean the
member, plain balance to mean the parameter.
If your solution passes the 0 case but fails the others, that’s the tell: acc.balance starts at 0 in main,
so a setBalance that accidentally does nothing (via unqualified balance = balance;, a no-op self-assignment)
would still happen to print the right answer for input 0, while silently failing for everything else.