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