#include<iostream>
using namespace std;int main(){
FILE *txt_file1 = fopen("text1.txt","r");
FILE *txt_file2 = fopen("text2.txt","r");
FILE *txt_file3 = fopen("text3.txt","r");
FILE *txt_file4 = fopen("text4.txt","r");
FILE *txt_file5 = fopen("text5.txt","w+");
char ch=' ';
char ch1='\n';
while((fread(&ch,1,sizeof(char),txt_file1) )){
fwrite(&ch,1,1,txt_file5);
}
fwrite(&ch1,1,1,txt_file5); while((fread(&ch,1,sizeof(char),txt_file2) )){
fwrite(&ch,1,1,txt_file5);
}
fwrite(&ch1,1,1,txt_file5); while((fread(&ch,1,sizeof(char),txt_file3) )){
fwrite(&ch,1,1,txt_file5);
}
fwrite(&ch1,1,1,txt_file5); while((fread(&ch,1,sizeof(char),txt_file4) )){
fwrite(&ch,1,1,txt_file5);
}
fwrite(&ch1,1,1,txt_file5);
return 0;
}å¯ä»¥è¿æ ·ç®åçå
温馨提示:答案为网友推荐,仅供参考