文字列を次のように保存できるように変換string str = "whatever"
する方法を知りたいwchar_t
wchar_t chResponse[] = ...(converted from string)..
私は次のコードを試しています:
string str = "whatever";
std::wstring_convert<std::codecvt_utf8<wchar_t>> utf8conv;
auto w_result = utf8conv.from_bytes(str); // convert utf8 to wchar_t
wchar_t chResponse[] = w_result;
このエラーが表示されます:
error C2075: 'chResponse' : array initialization needs curly braces