Re: [Coding] fopen?

From: George Greer (greerga@circlemud.org)
Date: 04/01/99


On Thu, 1 Apr 1999, Michael Cunningham wrote:

>Does any one have any ideas about how I could go about zeroing out a text
>file? What modes would i use with fopen? Or should I just use system
>calls? Basically I have a file that updates every few minutes based on
>certain factors being present but when those factors arent present I cant
>figure out how to just zero out the file. Any ideas?

FILE *thisfile = fopen("patch", "w");

       w        Truncate file to zero length or create text file for writing. The
                stream is positioned at the beginning of the file.

--
George Greer
greerga@circlemud.org


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST