你能在64位UNICODE构建中使用ofstream吗? [英] Can you use ofstream in 64bit UNICODE build?

查看:107
本文介绍了你能在64位UNICODE构建中使用ofstream吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在32位unicode版本中使用它:

I have this working in my 32 bit unicode build:

// Open and delete the Log File
LogFile.open(m_LogFilePath, std::ofstream::out | std::ofstream::binary);

// Check for a file open failure
if (LogFile.fail() != 0)
{
	Prompt.LoadString(IDE_FILE_OPEN_ERR);
	AfxMessageBox((Prompt + "\n") + m_LogFilePath, MB_TOPMOST | MB_OK | MB_ICONINFORMATION);
}

// Write a header to the log file
Header.LoadString(IDS_LOG_FILE_HEADER);
Header += _T("\n\n");
LogFile << Header;





然而<< 运算符在64位中失败构建。



任何想法为什么?



However the << operator fails in the 64 bit build.

Any idea why?

推荐答案

是的,参见https://msdn.microsoft.com/en-us/library/f1d6b0fk.aspx [ ^ ]。


这篇关于你能在64位UNICODE构建中使用ofstream吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆