here's my code
#include <iostream>
#include <conio>
#include "Account.h"
#include <fstream>
int main()
{
int accType, transType;
char accName[21];
char accHolder[17];
float amtWithdraw;
float amtDeposit;
ifstream dataFile;
dataFile.open("name.txt", ios::in);
Account customer[10];
//data for the objects are stored in a file. i need to store the inside
//respective palce in this array
if (transType==1)
{
cout<<"Please enter the amount you wish to withdraw: \n";
cin>>amtWithdraw;
customer.withdraw(amtWithdraw);
}
else if (transType==2)
{
cout<<"Please enter the amount you wish to deposit: \n";
cin>>amtDeposit;
customer.deposit(amtDeposit);
}
else if (transType==3)
{
cout<<"Balance in account: \n";
cout<<customer.getBalance();
}
else
{
cout<<"Please enter your transaction by pressing 1, 2, or 3: \n";
cin>>transType;
}
customer.printDetail();
getch();
return 0;
}

New Topic/Question
Reply




MultiQuote





|