CFile fText;
CFileException e;
CString str; try
{
if(!fText.Open(_T("Test.txt"), CFile::modeCreate|CFile::modeWrite/*|CFile::typeText*/, &e))
{
throw &e;
}
str = _T("<3>\"星际争霸\"");
fText.Write(str, str.GetLength());
fText.Close();
}
catch (CFileException *e)
{
TCHAR errorMsg[256];
e->GetErrorMessage(errorMsg, 256, NULL); str.Format(_T("%s"), errorMsg);
AfxMessageBox(str);
}
如何使这段中文正确的输入到txt文本中或者给个例子哈 [email protected]谢谢了
或者你使用CStdioFile,WriteString
"啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘"
我如何确保我每次都是读一个字呢?