15 Mar
2005
15 Mar
'05
3:13 p.m.
fgets and fread are binary safe as I know. But there is no function to calculate the binary size of the data. You have to do this manually.
From the User Contributed Notes on fwrite: note that fwrite() is binary-safe with strings only - you cannot write binary data with it (ie 32-bit integers, 1 (d)word etc) Trying to fwrite() an int will cause the int to be converted into string and then written as string.