scoping issues?

What's wrong with my code?
When I try the deposit/withdrawal function. the balance won't update accordingly. Similar to delete_acct function, it doesn't delete the account I want.

https://github.com/Flipppzw/hw
The problem is that getAccount(index) returns a copy of the object.

Here you change the copy not the original:

bank.getAccount(index).makeDeposit(amount);
Topic archived. No new replies allowed.