相关文章推荐
wukexin wrote:
[color=blue]
> I have a program in file input and output. I need copy the whole[/color]
source file's content to a string only once, I don't know what? Help me?
thank you.
Read my thread "fileToStri ng" (use http://groups.google.com and search for
my street name & fileToString).
I went with this:
std::string fileToString(st d::string const& name) {
std::ifstream in(name.c_str() );
std::ostringstr eam out;
out << in.rdbuf();
return out.str();
Phlip
 
推荐文章