I seem to be making some progress. The first two lines are saved. Now I'm tackling the lines with 6 characters. I'm using an infinite for() loop:
Code:
for(;;)
{
fgets(buff, sizeof (buff), file_stream);
sscanf(buff, "%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f);
printf("first row is %d %d %d %d %d %d\n", a,b,c,d,e,f);
if(a == -1) break;
}
I can see two issues here. The first one is how am I to store all the characters of each line so they can be accessed in the future. And the second one is, I really dont need the "-1" row to build my map, I just included it there for testing to break the for() loop. But it still gets saved. I would like to avoid that.