| | |
How to delete the file in the middle of a program
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2009
Posts: 181
Reputation:
Solved Threads: 28
boost::filesystem also provides
http://www.boost.org/doc/libs/1_38_0...ions-functions
remove as a portable means to delete a file.http://www.boost.org/doc/libs/1_38_0...ions-functions
Last edited by adam1122; Apr 12th, 2009 at 6:08 pm.
•
•
•
•
boost::filesystem also providesremoveas a portable means to delete a file.
http://www.boost.org/doc/libs/1_38_0...ions-functions
•
•
Join Date: Mar 2009
Posts: 181
Reputation:
Solved Threads: 28
•
•
•
•
Fortunately, the remove from <cstdio> is a standard library function so no need to fire a nuclear missile to kill a fly. It's an absolutely portable function
It would be perfectly reasonable to use in this case if the programmer has already put Boost in their toolkit.
•
•
Join Date: Mar 2009
Posts: 181
Reputation:
Solved Threads: 28
I should clarify here. Yes, Boost is unnecessary but so is cstdio in this context. But then so is the entire language of C++ or any other high-level language, for that matter.
Every library is there to make our life a little easier and so we don't have to re-invent the wheel everyday. Boost is a great example and should be put to use if someone finds it helpful.
Every library is there to make our life a little easier and so we don't have to re-invent the wheel everyday. Boost is a great example and should be put to use if someone finds it helpful.
•
•
•
•
I should clarify here. Yes, Boost is unnecessary but so is cstdio in this context. But then so is the entire language of C++ or any other high-level language, for that matter.
Every library is there to make our life a little easier and so we don't have to re-invent the wheel everyday. Boost is a great example and should be put to use if someone finds it helpful.
Otherwise let's discuss all great (and not only great) libraries where remove file functions exist. Let's consider how to use the Great Boost Library instead STL for streams, big num libraries instead of builtin operator +(POD,POD) and so on...
Keep it simpler
... Last edited by ArkM; Apr 12th, 2009 at 8:38 pm.
![]() |
Similar Threads
- need help with reading from a file with classes. (C++)
- Delete node help (C++)
- Script to delete or backup logs at a specific time and under specific user (Shell Scripting)
- Program Airline (Pascal and Delphi)
- help with sorting program (C++)
- Aurora/Trojan Horse Downloader.Small.15.BS problems (Viruses, Spyware and other Nasties)
- Can Anyone Help Me? IE Running Slow, Spybot Wont Boot, AVG Wont Update... (Viruses, Spyware and other Nasties)
- Trojan Horse Downloader.small.44.bw & 44.j (Viruses, Spyware and other Nasties)
- Hot Offers Hijack and Others (Viruses, Spyware and other Nasties)
- HijackThis error? (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: Convert characters to decimal in ASCII
- Next Thread: Config file
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bmp c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui iamthwee ifstream input int java lib library lines linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference return string strings struct studio system temperature template templates test text text-file tree unix url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






