gidaeyeo
2007-04-27 13:12:13 UTC
{ Note: this article was multi-posted to clc++. -mod }
Hi, all.
Is there any way to create an instance of std::ifstream using
std::string.
(through std::ifstream's constructor or assignment operator or
iterator, etc...)
i.e.
std::string str = "this is a string";
std::ifstream ifs = str; //<----- this is a just pseudo code.
(^^;; I can solve this using making temporty file and write the str on
the file and reading it using std::ifstream...
but I don't want to make a additional file io ^^)
plz show me the way~
Hi, all.
Is there any way to create an instance of std::ifstream using
std::string.
(through std::ifstream's constructor or assignment operator or
iterator, etc...)
i.e.
std::string str = "this is a string";
std::ifstream ifs = str; //<----- this is a just pseudo code.
(^^;; I can solve this using making temporty file and write the str on
the file and reading it using std::ifstream...
but I don't want to make a additional file io ^^)
plz show me the way~
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]