728x90 wstring1 you can convert a std::wstring to a const wchar_t * using the c_str member function #include // ... std::wstring wStr; const wchar_t *input = wStr.c_str(); // Count required buffer size (plus one for null-terminator). size_t size = (wcslen(input) + 1) * sizeof(wchar_t); char *buffer = new char[size]; #ifdef __STDC_LIB_EXT1__ // wcstombs_s is only guaranteed to be available if __STDC_LIB_EXT1__ is defined size_t convertedSize; std::wcstombs_s(&convertedSize, buffer, size, input,.. 2023. 2. 9. 이전 1 다음 728x90