There is an input.txt, with string sorted like this:
Name1 Name2 "number1:number2" "number1:number2"...
.
.
.
NameX NameY "number1:number2" " number1:number2"...
Baically we don't know how much names are in it, and how much "number:number" strings are in a row. The task is to write out the first name in each line, and write out the number of times, when number1 is bigger than number2 in each row. The thing is, I don't know how should I read in the pairs, without knowing how many are there from them in each row.
Thanks for the help in advance.
edit: My problem is not actually the part where I don't know how long the file is, I can read it in line by line, I don't know how should I read in a row, where I don't know how many strings are.
edit2, exaple: Steven Jack 2:5 6:4 7:2