By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,750 Members | 1,199 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,750 IT Pros & Developers. It's quick & easy.

remove() capability in fstream class/templates?

P: n/a
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.
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Matt" <ma**@downwithspammers-mengland.net> wrote...
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.


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
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.