Syntax for deleting specified file ( in C++)

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 6
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Syntax for deleting specified file ( in C++)

 
0
  #11
Jun 17th, 2003
What do you mean at closing? When you close your program? If so, just make it one of your last lines.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Reply With Quote Quick reply to this message  
Join Date: Jan 2004
Posts: 1
Reputation: sixtOnePercent is an unknown quantity at this point 
Solved Threads: 0
sixtOnePercent sixtOnePercent is offline Offline
Newbie Poster

Re: Syntax for deleting specified file ( in C++)

 
0
  #12
Jan 26th, 2004
Use the remove function ..ok BOB.. but how do i use it ,, syntax etc...
please bob, it's an emergancy.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 129
Reputation: Bob is an unknown quantity at this point 
Solved Threads: 1
Team Colleague
Bob Bob is offline Offline
Team Member

Re: Syntax for deleting specified file ( in C++)

 
0
  #13
Jan 31st, 2004
In header <cstdio>:
int remove(const char* filename)

Probably too late for you by now, as you needed an answer urgently. I hope you had the sense to look up remove() in your C++ book, or do a Google search.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 77
Reputation: infamous is an unknown quantity at this point 
Solved Threads: 2
infamous infamous is offline Offline
Junior Poster in Training

Re: Syntax for deleting specified file ( in C++)

 
0
  #14
Mar 23rd, 2004
Originally Posted by Mr Gates
Ebil cscgal

Anyway, how would I do that so it deleted the file at closing?
you can register a function that will be called when the program terminates with the atexit() function. this func could tehn call remove() on the file.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC