Connecting Tech Pros Worldwide Help | Site Map

remove() capability in fstream class/templates?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 12:51 AM
Matt
Guest
 
Posts: n/a
Default remove() capability in fstream class/templates?

Hello,

I would like to be able to delete (as in stdio.h remove()) fstream
objects. Is there a means for me to do this in C++? I see no such
capability in my references.

remove() is not so bad, except for the fact that I need to keep track
of a file's associated name in addition to it's fstream reference (I'm
presuming that fstream can not give me the filename, don't see a
reference to this either, please correct me if necessary) in order to
remove()/delete the file.

-Matt
--
Remove the "downwithspammers-" text to email me.

  #2  
Old July 23rd, 2005, 12:51 AM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: remove() capability in fstream class/templates?

"Matt" <matt@downwithspammers-mengland.net> wrote...[color=blue]
> I would like to be able to delete (as in stdio.h remove()) fstream
> objects. Is there a means for me to do this in C++? I see no such
> capability in my references.
>
> remove() is not so bad, except for the fact that I need to keep track
> of a file's associated name in addition to it's fstream reference (I'm
> presuming that fstream can not give me the filename, don't see a
> reference to this either, please correct me if necessary) in order to
> remove()/delete the file.[/color]

There is no such functionality (neither in C nor in C++). If you need
to delete (remove) a file from your file system, you have to know what
name it has and then use 'remove' or whatever other means your platform
provides.

V


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.