It would be easier to just read line by line and check the first character.
If it is an 'm', put the line into a stringstream and parse it that way.



ifstream File(FileName );

...