In is your input stream?
Yeah sorry I forgot, you need to pass into your function anything you want to use, so In needs to be passed in, and the variables you want to fill with data have to be passed in by reference so that they can be filled and returned
Call it with getFromFile(In, CustName, AccountNum, Date, SName, Shares) inside your loop in the main program.
void getFromFile(ifstream In, string &CustName, string &AccountNum, string &Date, string &SName, string &Shares)
In >> AccountNum;
In >> Date;
In >> SName;
In >> Shares;