主要是指性能上的效率,至少不能一个一个字符的读写吧?
你们怎么决定每次读写的buffer的大小?
最好是使用 c++ fstream 实现的.
行模式
流模式
buffer的定义可以很随意
#include <fstream.h>
#include <iostream.h>
void main(int argc, char* argv[])
{
if(argc <3)
{
cout << "pls input the src file and dest file name!" <<endl;
return;
}
ifstream in(argv[1],ios::binary);
ofstream out(argv[2],ios::binary);
out << in.rdbuf();
in.close();
out.close();
}