Thread: Deleting a program

  1. #1
    Registered User
    Join Date
    Oct 2005

    Deleting a program

    Hey guys after I run a program I have created and I try to delete the file it is in I get the message:
    "access is denied make sure the disk is not full or wrute protected and that the file is not currently in use."

    I have looked in my processes and can't see anything, could it be a pointer problem or does anyone know why this would happen?


  2. #2
    Registered User
    Join Date
    Feb 2006
    are you deleting it from a floppy disk? If so, maybe the disk has the little black button thing slid into the position to where its contents cant be altered?

  3. #3
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    New York
    The executable has been locked by the operating system. You will have to end the process in order to delete it.

  4. #4
    Registered User
    Join Date
    Oct 2005
    When I look in the running processes it doesnt appear to be there, how come the system would lock it, or could it be a pointer fault?

  5. #5
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Seattle, WA
    What exactly are you trying to delete? It sounded like you are trying to make a program that deletes it's own exe file. If it's not an executable file, then it's possible that another program is using the file, or that there's something wrong in your code
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."

  6. #6
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas
    if it's a windows application, it could be that you didn't handle some message correctly (WM_CLOSE perhaps?).
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. program throws assert after deleting a resource
    By hanhao in forum C++ Programming
    Replies: 3
    Last Post: 04-04-2007, 09:57 PM
  3. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM