Setting EOF

Started by
2 comments, last by Zaei 22 years, 5 months ago
Does anyone know how to set EOF in a file using C Style File IO? Z.
______________"Evil is Loud"
Advertisement
Can''t you just fprintf(EOF)?


I wanna work for Microsoft!
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!]
Thanks much!
______________"Evil is Loud"

This topic is closed to new replies.

Advertisement