I need help or clues on how to build an array in C++?

This program was design to simulate an ATM machine and so far it works.
I realize i need other aspects in this program to be more life like
for EX. I need to build an array that when I punch in a pin number the persons name assigned to that pin will pop up with the available balance already stored inside the array and what ever the withdraw amount it will subtract from that balance and what ever deposit amount it will add to that balance.

I've added to the original simplified version of the program but I'm stuck on the Arrays.

Does any body have any clues????


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <iostream>
#include <string>
using namespace std;



int main()
{

float Available_Balance [15];
string NAME [21];
int DebitCardPin[4];
double Balance = 0;
double Withdraw_Amount = 0;
double Deposit_Amount = 0;
int  Balance, Withdraw, Deposit;	
int Option;

char Cancel;

Balance = 1;
Withdraw = 2;
Deposit = 3;
Cancel = 4;

Option = 1,2,3, 4;

 
do 
  {
   cout<<"Please enter your Pin Number :\n";cin>>DebitCardPin; 


   cout<<"Please choose an option :\n"<<endl;

   cout<<"Enter: (1)-Balance, (2)-Withdraw, (3)-Cancel : \n"; cin>> Option;




	if (Option == 1)
	{
		cout<<"Your Available Balance Is: \n";
		cout<<Available_Balance;
	
		if (Option == 2)
		{
		     cout<<"Please enter amount:\n"<<endl;
		     cin>>Withdraw_Amount;
		     cout<<"please wait while we process you Transaction"<<endl;
		
		if (Option == 3)
		      {
				 cout<<"Transaction cancled"<<endl;
				 cout<<"\nHave a nice day";
                      }           
		}
	 }
    } while (Option!=Cancel);
	

return 0;
}
Topic archived. No new replies allowed.