I want to help you but could you explain again how the accounts work or tell me if I understand correctly.
A client of the bank must have 3 acounts. Each account has a separate balance. He may deposit/witdraw or query any one of his 3 accounts by typing the account ID. After doing that, he sees the balance from all 3 accounts.
You may declare:
struct client
{
account[3];
}
acount
{
balance;
number;
Init(AssignedIDNumber, EntryBalance = 0);//Same as create
Deposit();
Withdraw();
}
//Here you associate an account number to the balance it has, and above you associate the 3 accounts to one client
Program summary
Initialize a client information,
client.acount[0].Init(xxxxx);
client.acount[1].Init(xxxxx);
client.acount[2].Init(xxxxx);
Get Menu option
Ask for an account number
Then ask what to do for that account
Search for the account and get a handle to the client with that account because he has two other account that we need
for all client
for all account by that client
is the an account number match then return client handle and account handle
Do operation on that acount
accounthandle->Deposit(Money)
Display all acounts of client
clienthandle->acount[0].display()
clienthandle->acount[1].display()
clienthandle->acount[2].display()
You can change the order of some of the proceedure, but the important thing is to save the account number in a variable and call the variable, and do not write (if x == 1235) kind of thing. Also try to keep your data as organised as possible, if you can follow DK's code you will see a lot of structs and that is the big plus.
Let's act on what we agree on now, and argue later on what we don't.
Black men leave Barbeque alone if Barbeque don't trouble you