15,976
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void CmfctestDlg::OnBnClickedOk()
{
// TODO: 在此添加控件通知处理程序代码
//OnOK();
wifstream infile(L"E:\\GotaBrowser\\release\\interpreter.txt", ios::in);
if (!infile)
{
AfxMessageBox(L"can not open");
}
wstring str;
getline(infile, str);
AfxMessageBox(str.c_str());
infile.close();
}
#include <iostream>
#include <fstream>
#include <string>
//using namespace std;
void CmfctestDlg::OnBnClickedOk()
{
// TODO: 在此添加控件通知处理程序代码
//OnOK();
std::wifstream infile(L"E:\\GotaBrowser\\release\\interpreter.txt", ios::in);
if (!infile)
{
AfxMessageBox(L"can not open");
}
wstring str;
getline(infile, str);
AfxMessageBox(str.c_str());
infile.close();
}