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)


client* pointerClient;
pointerClient = client[correctclient] 
return  pointerClient                 

return NULL


and here is the call function in main

int main()
{   Client *client = NULL;
    //Create and open the bank
    Bank bank("testBank");;

    //preform transactions for a valid client login
    client = bank.login();
    if (client)

    //clean up

    return 0;


I can't figure out what return type to have, nothing i've tried works

The only issue I can see is that sometimes you use the type client and sometimes you use Client. C++ is case-sensitive. It should be returned a pointer to Client.