I assume the first problem for you is learning how to read a file. Read more about the class called "fstream", and learn how to use the operator << and >> in fstream to read a text file. If you have a specific question, you're welcome to post it here.