I'm reading in a file into an array, but when I print out the first element of the array it's always the last line of the file. How can I avoid doing this?
Specifically I want to store the lines into each array element. I'm not sure exactly how to explain myself but I hope someone will understand. Here's a sample of my code
Code:while( j < 8) { fgets(storeS,100,dataCar); strcpy(ssheet[i],storeS); printf("%s",ssheet); j++; } printf("%s",ssheet[0]);