Maybe for now you should forget about the structure. Break your problem down.
First, find out how to read line by line. This might help: http://www.cplusplus.com/doc/tutorial/files/
Then look at data validation/consistency as to how it could be done.
And then you could probably rethink the structure problem.