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");
1.4m articles
1.4m replys
5 comments
57.0k users