问题
How do you convert LPCWSTR to const char *?
Thanks
回答1:
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.
回答2:
You can also have a look at wcstombs_s
来源:https://stackoverflow.com/questions/4542521/how-do-you-convert-lpcwstr-to-const-char