Rewrite a open file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • philipwayne
    New Member
    • Mar 2010
    • 50

    Rewrite a open file?

    Is there a way to rewrite a open file in C? So say every time I want to rewrite to a file rather then having to reopen it I can just rewrite the contents inside. Any help is greatly appreciated.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    As long as the file was opened for writing in the first place all you have to do is "seek" to the beginning of the file again.

    Check your library documentation for seek.

    Comment

    Working...