| | |
Syntax for deleting specified file ( in C++)
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
0
#2 Jun 4th, 2003
If you're writing a Windows application, try the DeleteFile function available in winbase.h:
C++ Syntax (Toggle Plain Text)
BOOL DeleteFile( LPCTSTR lpFileName // pointer to name of file to delete );
•
•
Join Date: Feb 2003
Posts: 129
Reputation:
Solved Threads: 1
You're welcome.
Now, please post again. That 666 (posts) is making me uneasy ;-)
http://www.robertjacobs.fsnet.co.uk/images/dani2.jpg
Now, please post again. That 666 (posts) is making me uneasy ;-)
http://www.robertjacobs.fsnet.co.uk/images/dani2.jpg
Are those suppose to be horns? They look like donkey ears.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
An easy way to delete a file is to just call a system command from Windows. dafile.txt is the file you want to delete.
C++ Syntax (Toggle Plain Text)
#include <stdlib.h> // needed to use system() function int main() { system("del dafile.txt"); return 0; }
Check out my blog at http://www.shinylight.com for more stuff about web dev.
![]() |
Similar Threads
- Error Deleting File or Folder (Windows NT / 2000 / XP)
- Error deleting file or folder (Viruses, Spyware and other Nasties)
- Error deleting file or folder (Windows NT / 2000 / XP)
- ASP: Deleting a file (ASP)
- error deleting file (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: "missing storage-class or type specifiers" error
- Next Thread: access Digital Camera Functions
| Thread Tools | Search this Thread |
api array based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets







