Hi,
I am a student who has just started using C++. I have a program that works but I have to take parts of the code and turn them into functions. I really have no idea how to do this.
Here is an example of what I am trying to do. I want to make a void function to read in some info from a file because I have to read this same info in a few times within the program.

this is the code I want to put in a function:

getline(In, CustName);
In >> AccountNum; In >> Date; In >> SName;
In >> Shares;

Any help would be appreciated.
Thanks!