so the assignment I have is for a bank login program. and the function looks like so
Client* Bank::login()
based off a boolean value this bank command(which has a private: client* to an array of clients)
I have to return a pointer to the correct client or NULL.
so simplified I have
Client* Bank::login()
{
Ask for login infor;
attempt successful login;
if (login successful)
//ERROR SOMEWHERE// IN HERE
client* pointerClient;
pointerClient = client[correctclient]
return pointerClient
else
return NULL
}
and here is the call function in main
int main()
{ Client *client = NULL;
//Create and open the bank
Bank bank("testBank");
bank.open;
//preform transactions for a valid client login
client = bank.login();
if (client)
bank.preformTransactions(client);
//clean up
bank.close();
return 0;
}
I can't figure out what return type to have, nothing i've tried works