1、文件必须以二进制形式打开
FILE* pfileone=fopen("fileone","rb");
FILE* pfiletwo=fopen("filetwo","wb");
2、读取文件,并存放数据
char *buf;
int len=ftell(pfileone);
buf=new char[len+1];
fread(buf,1,len,pfileone);
3、写文件
fwrite(buf,1,len,pfiletwo);
4、结尾
delete buf;
fclose(pfileone);
fclose(pfilletwo);