Mail Archives: djgpp/1997/02/10/20:56:05
On 10 Feb 1997 14:02:19 +0000, Ian Miller <itmiller AT dra DOT hmg DOT gb> wrote:
>I'd like to say "truncate this file here" in one of my programs.
>
>Can I/how do I do this with standard C/C++?
Yes
>Can I/how do I do this with non-standard features of DJGPP C/C++?
You don't need to.
>At the moment, if I delete a word from a file (a dictionary file
>as it happens) and shift everything down to reclaim the space,
>I'm left with a load of spare space at the end that I can't get
>rid of.
Post some code demonstrating what you're doing... i.e. what functions
you are using to open and read the file, and how you're writing back
to the file.
Also look up: info libc a ftruncate
George Foot
- Raw text -