如何将char字符串转换为wchar_t字符串? [英] How do I convert a char string to a wchar_t string?
本文介绍了如何将char字符串转换为wchar_t字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 char *
格式的字符串,并希望将其转换为 wchar_t *
,以传递给Windows函数.
I have a string in char*
format and would like to convert it to wchar_t*
, to pass to a Windows function.
推荐答案
这个小功能有帮助吗?
#include <cstdlib>
int mbstowcs(wchar_t *out, const char *in, size_t size);
另请参见 C ++参考a>
这篇关于如何将char字符串转换为wchar_t字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文