Problem with fread
Ajay Bansal
Ajay_Bansal@infosys.com
Tue May 20 13:15:00 GMT 2003
Hi All
We are using fread to read the entire contents of the file in a buffer.
Does fread append "\0" at the end of the buffer or we have to do it
manually?
Attached is a sample program. We are using the test function twice.
Second time when we call the fucntion, give file has a smaller size then
what was given at the first call.
Second time, output is gargled towards end.
any idea???
Regds
Ajay Bansal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030520/fff226f9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_fread.cpp
Type: application/octet-stream
Size: 1884 bytes
Desc: test_fread.cpp
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030520/fff226f9/attachment.obj>
More information about the Gcc-help
mailing list