I would like to convert a char* string to a wchar* string in C.
char*
wchar*
I have found many answers, but most of them are for C++. Could you help me?
Thanks.
Try swprintf with the %hs flag.
swprintf
%hs
Example:
wchar_t ws[100]; swprintf(ws, 100, L"%hs", "ansi string");
2.1m questions
2.1m answers
60 comments
57.0k users