Outputting 'wchar_t*' to an 'ofstream'

强颜欢笑 提交于 2019-11-30 17:29:37
Dmitriy

First, use std::wofstream instead of std::ofstream.

Also, use the L prefix on your text string to indicate that your text is wide character text:

wchar_t   *Col1=L"dsffsd"

Since you have written it using wide characters (wchar_t), you need to look at the resulting file with something that understands wide characters.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!