How can he use a function to read data from a file into a struct?
Pass by reference a data structure to read in the data, and pass by value/reference a string or some way to identify the file to read. You may want to return a boolean value, true if everything went alright, false if something went wrong.
I'll put the very basics. I can't get too specific unless you give an example of the data and how it should be parsed.
Basics:
In the function, open the file for reading.
Figure out how to parse the data.
Take each line and store it appropriately in the data structure.
Close the file.