c - fgets dont return NULL when no new line found -
well i'm using while loop:
while(fgets(pclientrow, 1024 , f) != null)
in other classes works ok, in 1 of them, when i'm reading file line line, won't out of loop when lines end, saw in debugger.
why it? , working in class before , dont know why keep bringing empty lines untill it's crshing..
any idea?
fgets in standard ansi c function, see documentation: here fgets read max. 1023 character next '\n' or eof. lines longer 1023 character or last line has no terminating newline.
Comments
Post a Comment