Thread: deleting files

  1. #1
    v0id
    Guest

    Unhappy deleting files

    how can i delete files with c++? im using visual studio and programming in windows if that helps any

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    Try DeleteFile(LPCTSTR lpFileName)

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    #include <cstdio>

    remove (file);

    Kuphryn

  4. #4
    Try the system() function...Although you will have to edit the source a little through each operating system you use.
    What will people say if they hear that I'm a Jesus freak?
    What will people do if they find that it's true?
    I don't really care if they label me a Jesus freak, there is no disguising the truth!

    Jesus Freak, D.C. Talk

    -gnu-ehacks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with loading files into rich text box
    By blueparukia in forum C# Programming
    Replies: 3
    Last Post: 10-19-2007, 12:59 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. fopen vs. _open (for BIG image files)
    By reversaflex in forum C Programming
    Replies: 3
    Last Post: 04-01-2007, 12:52 AM
  4. Permanently deleting files
    By Yasir_Malik in forum Windows Programming
    Replies: 1
    Last Post: 08-01-2006, 10:07 PM
  5. deleting files not in fstream?
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 10-09-2001, 01:36 PM