2020年11月27日

使用 istreambuf_iterator 读取文件内容,赋值给 std::string

摘要: 需要一个一个字符输入时考虑使用istreambuf_iterator 假设我们要把一个文本文件拷贝到一个字符串对象中。似乎可以用一种很有道理的方法完成: ifstream inputFile("d:\\test.plist"); string fileData((istream_iterator<c 阅读全文

posted @ 2020-11-27 16:25 大湾 阅读(629) 评论(0) 推荐(0) 编辑

导航