可以去掉空格和换行voidCMainFrame::OnTrim(){FILE*pfile=fopen("a.txt","r+");//CStringstrin("s");//fwrite(strin,1,1,pfile);fseek(pfile,0,SEEK_END);intlen=ftell(pfile);char*buf;buf=newchar[len+1];memset(buf,0,len+1);fseek(pfile,0,SEEK_SET);fread(buf,1,len,pfile);//buf="erge