So I was trying to think of a way to get the first number of each line from a file in C.
Example;
100 2 4 5 7 8
102 3 4 5 6 7
400 6 7 9 9 3
420 5 7 3 6 3
And I want to have the array[5]
array[5] = {100, 102, 400, 420}
arrrayb[5] = {2, 3, 6, 5}
arrayc [5] = {4 5 7 8, 4 5 6 7, 7 9 9 3, 7 3 6 3}
So far I have a way to count the number of lines;
while ((c = fgetc (file)) != EOF)
{
if(c=='\n'){
nlines++;
}
}
Thank you