Clearning file contents

  • Thread starter Thread starter Harish
  • Start date Start date
H

Harish

I am doing file operations using fopen(),
fwrite(), fclose() group of functions.
At times I need to clear the file contents while
the file is open.
Is there a function in the same group to do it?
(Or a workaround other than closing and
reopening the file in write mode?)
--Harish
 
Harish said:
I am doing file operations using fopen(),
fwrite(), fclose() group of functions.
At times I need to clear the file contents while
the file is open.
Is there a function in the same group to do it?
(Or a workaround other than closing and
reopening the file in write mode?)
--Harish
Goto the very beginning of the file by means of the _lseek() function.
 
Back
Top