为什么是显示乱码,UNICODE的问题吗?
为什么是显示乱码,UNICODE的问题吗?
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void CmfctestDlg::OnBnClickedOk()
{
// TODO: 在此添加控件通知处理程序代码
//OnOK();
wifstream infile(L"interpreter.txt", ios::in);
if (!infile)
{
AfxMessageBox(L"can not open");
}
wstring str;
getline(infile, str);
AfxMessageBox(str.c_str());
infile.close();
}
那个txt文件我在记事本下改成了各种格式保存都不行,各位给我个解决办法吧,求你们了