scoobydrvr
Junior Member
Lame, I know, but I'm taking a summer class and i've got an assignment that has me stumped.
I've got to overload the += and -= operator so that I can increase the value of a variable within an object by a value. For example:
SavingsAccount saver1;
saver1 += 234;
This needs to increment a data member called savingBalance belonging to the class SavingsAccount.
Wikipedia and all other sources I've tried have failed me. I'm hoping there are some professionals here that can offer me a hand... please?
I've got to overload the += and -= operator so that I can increase the value of a variable within an object by a value. For example:
SavingsAccount saver1;
saver1 += 234;
This needs to increment a data member called savingBalance belonging to the class SavingsAccount.
Wikipedia and all other sources I've tried have failed me. I'm hoping there are some professionals here that can offer me a hand... please?