问题描述
解决方案
(http://img.ask.csdn.net/upload/201604/08/1460115662_349775.png)
解决方案二:
void PlayDesByFile(char *source,char*dest)
{ int time=0,i=0;
long filelength;
FILE *s,*d;
char sbuffer[20]={0},dbuffer[8]={0};
int count;
if((s=fopen(source,"r+"))==NULL){
printf("11111");
return;
}
if((d=fopen(dest,"w+"))==NULL){
printf("22222");
return;
}
fseek(s,0,SEEK_END);
filelength=ftell(s);
rewind(s);
while(!feof(s)){
fread(sbuffer,1,8,s);
i++;
// PlayDes(dbuffer,sbuffer);
fwrite(sbuffer,1,8,d);
}
解决方案三:
文件1. txt内容为abcdefgh
输出的2.txt为abcdefghabcde
时间: 2024-12-03 07:38:27