如何将LPCWSTR转换为const char *? [英] How do you convert LPCWSTR to const char *?
本文介绍了如何将LPCWSTR转换为const char *?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将LPCWSTR转换为const char *?
感谢
解决方案>
使用 WideCharToMultiByte
函数。
请注意, LPCWSTR
与 const wchar_t *
,所以如果你在整个应用程序中处理宽字符数据,你可能不需要转换它。
How do you convert LPCWSTR to const char *?
Thanks
解决方案
Use the WideCharToMultiByte
function.
Note that LPCWSTR
is the same as const wchar_t *
, so if you're dealing with wide character data throughout your application, you may not need to convert it at all.
这篇关于如何将LPCWSTR转换为const char *?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文