Reading Files In - end of file and placing null
using c language:
basically what im trying to do is to read in the first 10 characters of a file then put them into an array, process them in some way, and then read in the next 10 characters into the same array overwriting the first 10 and then processing again.
im doing this over and over until the end of the file, where if there is not a full 10 characters in the last array then place 'null' into the last few array fields. for example if the last 10 characters read in where just "the_end" then the array[7,8,9] fields must equal 'null'.
just mainly having trouble in checking for a end of file without losing the character to check and then placing null in the last few fields.
thanx
|