I am trying to create a program with Irrlicht that loads certain things from a configuration file written in Lua, one of which is the window title. However, the lua_tostri
For Unicode:
std::string myString = "Master James";
const char* sz = myString.c_str();
size_t origsizes = strlen(sz) + 1;
const size_t newsizes = 500;
size_t convertedCharP = 0;
wchar_t constTowchar[500];
mbstowcs_s(&convertedCharP, constTowchar, origsizes, sz, _TRUNCATE);
std::wcout << constTowchar << std::endl;
This is working using mbstowcs_s
.