I am suppose to use arrays where i read in data from a text file and i have to set these functions to it. any clues on how i would approach it.
my main concern is how to read data from a file using class while using arrays. i know how to do it in main function but i am confused about using it with class.
would i read it with a function in side the class? or inside main and pass it inside class (if this is even doable).
Please help..
thanks in advance.
#include<iostream>
#include<string>
using namespace std;
class AtmMachine{
public:
void getAccountNumber();
void setAccountNumber();
void getAccountHolderName();
void setAccountHolderName();
void getCurrentBalance();
void setCurrentBalance();
void add2CurrentBalance();
void subtractFromCurrentBalance();
customerAccounts[500];
actulCustomerNumber[];
private:
string fName;
string lName;
int accountNum;
int currentBalance;
int pinNum;
};
int main()
{
}