D
dacium
Can you set the current position in a stream to be the new end of
file?
I am opening a file with fopen(filename,"r+b")
I am moving back and forth with fseek to read and write in the file,
but sometimes there is data at the end of the file that I don't want
to be part of the file anymore. How do I truncate it?
All I could find was ftrunctate but its unistd, so I am guessing there
is no standard way accomplish a truncation?
Thanks
file?
I am opening a file with fopen(filename,"r+b")
I am moving back and forth with fseek to read and write in the file,
but sometimes there is data at the end of the file that I don't want
to be part of the file anymore. How do I truncate it?
All I could find was ftrunctate but its unistd, so I am guessing there
is no standard way accomplish a truncation?
Thanks