69,336
社区成员
发帖
与我相关
我的任务
分享
void Read()
{
FILE *file = fopen("abc.txt","r");
fseek(file,0,SEEK_END);
long n = ftell(file);
;//去掉最后的回车换行
char *list =new char[n+1];
rewind(file);
fread(list,sizeof(char),n,file);
list[n]='\0';
cout<<list;
}