Possible options(depending on file format since I am not sure):

1. fscanf().
2. Using an fgets/sscanf pair.
3. Working with the solution you already have in place, you can convert a string to an...