I am trying to read a file which has the first two lines marked with a "%" as the first character. I need to ignore these two lines, and then read 4 separate integer variables, separated by an unknown amount of white space. This then repeats for each line until EOF. I am attempting to use open() from fcntl.h.
Is there a way to begin reading after 2 full lines, and then separate the 4 values with white space between them into 4 integer variables?
This is a sample file:
% Input file
% number time time2 priority
0 10 4 2
1 8 2 1
2 12 0 5
3 2 4 4