1、文件必须以二进制形式打开
FILE* pfile1=fopen("fileone","rb");
FILE* pfile2=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);