流云飞飞

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

03 2013 档案

摘要:使用C++标准程序库的输入输出流(I/O Stream)复制文件,存在许多的方法,方法一:逐个字符复制#include <fstream>std::ifstream input("in", ios::binary);std::ofstream output("out", ios::binary);char ch;while(input.get(ch)) output << ch;注意:如果使用input> > ch读取字符,则必须先调用input.unsetf(ios::skipws)取消输入流默认的跳过空白符的输入格 阅读全文
posted @ 2013-03-29 14:48 流云飞飞 阅读(637) 评论(0) 推荐(0)