[英]How can I convert CString to WCHAR* and std::string to WCHAR* in C++, not wchar_t*
I want to convert CString
to WCHAR*
or std::string
to WCHAR*
in Visual Studio C++ MFC Application.我想在 Visual Studio C++ MFC 应用程序中将
CString
转换为WCHAR*
或将std::string
转换为WCHAR*
。 I found in stackoverflow that it only has the solution for convert to wchar_t*
.我在 stackoverflow 中发现它只有转换为
wchar_t*
的解决方案。
Please help me.请帮我。 Thank you!
谢谢!
I believe CString
class can do such conversion:我相信
CString
class 可以做这样的转换:
CStringA a = "ANSI";
CStringW w(a);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.