• Advertisement

Archived

This topic is now archived and is closed to further replies.

Setting EOF

This topic is 5944 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to set EOF in a file using C Style File IO? Z.

Share this post


Link to post
Share on other sites
Advertisement
No, Oluseyi, you can''t. Remember that EOF is not allowed to be 0-255, so writing it out as a single byte is somewhat hard. The POSIX standard has an ''ftruncate'' function. In Windows you can use OpenFile, SetFilePointer, and SetEndOfFile together.

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites

  • Advertisement