Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How to delete a file from C++ program

Reply
Thread Tools

How to delete a file from C++ program

 
 
Michael DOUBEZ
Guest
Posts: n/a
 
      02-28-2008
Leslaw Bieniasz a ¨¦crit :
> OK Guys, all your suggestions require mixing of C++ streams
> with some stdio.h functions or the like, and such mixing
> (if I understand) is generally not recommended. My intention
> is to find a solution which involves C++ streams only.
> Is this possible?
> [snips]


It is not. streams do not care about files, they are a concept.
The fstream lib is only a helper to connect a file sink to a stream.

There is no problem in mixing <fstream> and <cstdio>. They are both part
of the c++ standard so remove() should be fairly portable.

Michael
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Doesn't File.delete() delete immediately? vandmzah@gmail.com Java 3 07-05-2006 06:25 PM
To delete few lines and add few lines at the end of a text file using c program Murali C++ 2 03-09-2006 04:45 PM
Can someone tell me why I can't delete this file? and why it blue screens WinXP Pro on delete? zZz Computer Support 1 01-12-2005 02:37 AM
XP wont let me delete program even after changing file from read only? Rachel and Steve Computer Support 4 05-24-2004 11:43 PM



Advertisments