Problem: The statement ++Chequebook1; should increment the member variable Balance of
Chequebook1 by R100. Give three different implementations for the overloaded operator ++
to accomplish this:
• using the member function Adjust()
• implementing the overloaded operator ++ as a friend function
• implementing the overloaded operator ++ as a member function
ive been struggling with this one for days, i havent came up with a correct solution but heres my code:
please help me :(
Problem #1: you claim you're struggling with this code.
Problem #2: you give no indication what the struggle is
Problem #3: we are not psychic so have no idea what the struggle is
Solution#1: read the post at the top of the forum titled "Read This Before Posting A Question"
Solution#2: post again
After skimming over your code, i think cout << "Balance after withdrawal: R" << Chequebook1 << endl; should be cout << "Balance after withdrawal: R" << Chequebook1.currentBalance() << endl;
Which is in line 50. Same with line 52.