摘要: //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 阅读全文
posted @ 2012-07-19 09:46 l851654152 阅读(566) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2012-07-19 09:41 l851654152 阅读(315) 评论(0) 推荐(0) 编辑