I've been working on a project to make a ATM bank application but I've ran into a problem. I need to make an unlimited number of vectors of the class Bank I've created.
I can't seem to find out how. I tried push_back but it did not work for me.
I know that there are some variables and loops that aren't used properly. I believe that this is all the code I need to display to get my question resolved.
I can't seem to find out how. I tried push_back but it did not work for me.
I know that there are some variables and loops that aren't used properly. I believe that this is all the code I need to display to get my question resolved.
Code:
using namespace std;
int main()
{
bool loop1 = true;
bool loop2 = true;
bool loop3 = true;
bool loop4 = true;
int i = 0;
int clientInt;
while (loop1)
{
vector<Bank> clients(2);
while (loop2)
{
while (loop3)
{
clients[i].set_account(clients);
if (clients[i].get_account_setup() == false)
break;
while (loop4)
{
clients[i].main_menu(clients, i);
if (clients[i].get_mm_response() == 4)
loop4 = false; i++;
}
//cout << i << endl; // for debugging purposes
loop4 = true;
}
loop2 = false;
}
cout << endl << endl;
system("pause");
return 0;
}
}
Comment