FILE 写txt文件
CString sx;
cstring sy;
FILE *fp = fopen(":\\表.txt","w+");
fprintf(fp,"%s %s %s\n","00",sx,sy);
为什么sx是“555”的时候表.txt只有一个5
[解决办法]
CString sx("555"); CString sy; FILE *fp = fopen(":\\表.txt","w+"); fwprintf(fp,_T("%s %s\n"),sx.GetBuffer(0),sy.GetBuffer(0)); fclose(fp);
[解决办法]