I've made a program that creates a log of the activities performed in it, for easy reference for the user. But I want the program to automatically delete the file after the program is shut down. What is the syntax and how do I go about doing it?
Mr Gates 0
Light Poster
Recommended Answers
Jump to PostTo delete a file use the C++ remove() function.
Jump to PostIf you're writing a Windows application, try the DeleteFile function available in winbase.h:
BOOL DeleteFile( LPCTSTR lpFileName // pointer to name of file to delete );
Jump to Postthanks Bob :)
Jump to PostYou're welcome.
Now, please post again. That 666 (posts) is making me uneasy ;-)
[img]http://www.robertjacobs.fsnet.co.uk/images/dani2.jpg[/img]
All 14 Replies
Bob 15
using namespace Bob Team Colleague
Dani 4,084
The Queen of DaniWeb Administrator Featured Poster Premium Member
Mr Gates 0
Light Poster
Dani 4,084
The Queen of DaniWeb Administrator Featured Poster Premium Member
Bob 15
using namespace Bob Team Colleague
Dani 4,084
The Queen of DaniWeb Administrator Featured Poster Premium Member
samaru 145
a.k.a inscissor Team Colleague
samaru 145
a.k.a inscissor Team Colleague
Mr Gates 0
Light Poster
samaru 145
a.k.a inscissor Team Colleague
sixtOnePercent 0
Newbie Poster
Bob 15
using namespace Bob Team Colleague
infamous 26
Junior Poster in Training
brainysmurf0316 0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.