[求助]文件方面的读写修改问题
#include<stdio.h>#include<stdlib.h>
#include<math.h>
int main()
{
FILE *fp1,*fp2,*fp3;
char ch1,ch2;
fp1=fopen("e:\\Google2.htm","r");
fp2=fopen("e:\\miwen.txt","r");
fp3=fopen("e:\\Google3.htm","w");
{
while((ch1=fgetc(fp1))!=EOF)
{
while((ch2=fgetc(fp2))!=EOF)
{
if(ch2&&10000000==1)
ch1=ch1;
else
ch1=ch1+32;
fputc(ch1,fp3);
if(ch2&&01000000==1)
ch1=ch1;
else
ch1=ch1+32;
fputc(ch1,fp3);
if(ch2&&00100000==1)
ch1=ch1;
else
ch1=ch1+32;
fputc(ch1,fp3);
if(ch2&&00010000==1)
ch1=ch1;
else
ch1=ch1+32;
fputc(ch1,fp3);
if(ch2&&00001000==1)
ch1=ch1;
else
ch1=ch1+32;
fputc(ch1,fp3);
if(ch2&&00000100==1)
ch1=ch1;
else
ch1=ch1+32;
fputc(ch1,fp3);
if(ch2&&00000010==1)
ch1=ch1;
else
ch1=ch1+32;
fputc(ch1,fp3);
if(ch2&&00000001==1)
ch1=ch1;
else
ch1=ch1+32;
fputc(ch1,fp3);
}
fputc(ch1,fp3);
}
fclose(fp1);
fclose(fp2);
fclose(fp3);
}
}
我是想通过读写第一个和第2个文件,把第2个文件的信息以2进制方式嵌入到第一个全大写的文件中去,遇见1为大写0为小写,可是运行后却改变不了,请各位高手帮忙出问题在哪 应该怎么写