一个小东西纠结了我好久.......
CString m_strColINfoFilePath = L"C:\\Documents and Settings\\abin\\桌面\\测试.txt";
FILE *fr_ColOut;
CString strLineVal2;
strLineVal2.Format(L"%s\t%s\r\n",
L"序号",
L"时间");
fr_ColOut = _wfopen(m_strColINfoFilePath,L"wt,ccs=UNICODE");
unsigned short head = 0xFEFF;
fseek(fr_ColOut,0L,SEEK_SET );
fwrite(&head,sizeof(head),1,fr_ColOut);
fputws(strLineVal2,fr_ColOut);
fputws(strLineVal2,fr_ColOut);
fflush (fr_ColOut);
fclose(fr_ColOut);
FILE *fr_ColOut;
CString strLineVal2;
strLineVal2.Format(L"%s\t%s\r\n",
L"序号",
L"时间");
fr_ColOut = _wfopen(m_strColINfoFilePath,L"wt,ccs=UNICODE");
unsigned short head = 0xFEFF;
fseek(fr_ColOut,0L,SEEK_SET );
fwrite(&head,sizeof(head),1,fr_ColOut);
fputws(strLineVal2,fr_ColOut);
fputws(strLineVal2,fr_ColOut);
fflush (fr_ColOut);
fclose(fr_ColOut);