I am attempting to put integers from a text file to an array. I am new to C. I have already found the number of lines and opened the file. I do not understand why this does not work:
for(i = 0; i <= numberlines; i++)
{
fscanf(f, "%d", &z[i]);
}
The numbers in the text file are arranged as so:
4
251
3
-45
124
I want to scan all the numbers into array z[] except for the first one. I would paste my whole program attempt, but the remote desktop won't let me copy and paste back on to my original computer... I mean I just did it a couple of minutes ago.. it's being werid. But anyways back to the problem..
I want to do this without the use of "get" or "put", because my understanding of those functions are limited.
THANK YOU !