摘要:
//useCtowriteintofile FILE*pFile=fopen("1.txt","w");CStringstrTemp="helloworld!";fwrite(strTemp,1,strTemp.GetLength(),pFile);fflush(pFile);fclose(pFile);//useC++towriteintofile ofstreamofs("2.txt");CStringstr="UseC++.HelloWorld!";ofs.write(str,str.Ge 阅读全文
摘要:
View Code //首先从UTF8转到UNCODE//再从UNCODE转到ANSIint ConvUtf8ToAnsi(CString& strSource, CString& strChAnsi){ if (strSource.GetLength() <= 0) return 0; CString strWChUnicode; strSource.TrimLeft(); strSource.TrimRight(); strChAnsi.Empty(); int iLenByWChNeed = MultiByteToWide... 阅读全文