| | |
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 );
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
0
#5 Jun 11th, 2003
thanks Bob
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
•
•
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
Oh, goodness gracious! I guess it would be most appropriate to make this my 667th post then.
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
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 arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file forms fstream function functions game generator getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






