70,023
社区成员




#include <iostream.h>
#include <stdio.h>
#include <string.h>
void main()
{
char dest[20]= " ";
char* temp=new char [2];
temp[1] = '\0';
FILE* fp;
if((fp=fopen( "1.txt ", "r "))==NULL)
{
cout << " open error! " <<endl;
return;
}
char ch=fgetc(fp);
dest[0]=ch;
while(ch!=EOF)
{
ch=fgetc(fp);
temp[0]=ch;
strcat(dest,temp);
}
cout <<dest <<endl;
}