c++文件复制
摘要:
转帖,转帖位置忘了使用C++标准程序库的输入输出流(I/O Stream)复制文件,存在许多的方法,方法一:逐个字符复制#include std::ifstream input("in",ios::binary);std::ofstream output("out",ios::binary);char ch;while (input.get(ch)) output >ch读取字符,则必须先调用input.unsetf(ios::skipws)取消输入流默认的跳过空白符的输入格式,因为换行符是空白符的一种。(BEN注:流失操作以空白字符'/0 阅读全文
posted @ 2011-05-18 21:34
几百人有爱
阅读(661)
评论(0)
推荐(0)
浙公网安备 33010602011771号