CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2001
    Location
    United States
    Posts
    725

    How to delete a file?

    Hi, how can I delete a file (using fstream or something similar)? I know how to clear one, but I need to delete it. Please post info here, thanks.


  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    95

    Re: How to delete a file?

    On Windows platforms you can use the DeleteFile() API. It takes the file name as the parameter.

    Best Regards,
    Kabilan.

    Pl rate if it helped. It inspires...


  3. #3
    Join Date
    Sep 1999
    Location
    Johnson City, NY
    Posts
    43

    Re: How to delete a file?



    #include <stdio.h>

    remove("file2delete.bye");





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured