I am trying to compile the following code in my test application on windows in visual studio for C++:
const wchar_t* chinese = "好久不见";
But I get the following error:
error C2440: 'initializing' : cannot convert from 'const char [5]' to 'const wchar_t *
I am compiling with unicode, so I am confused about this. The error goes away if I cast the literal like this:
const wchar_t* chinese = (wchar_t*)"好久不见";
I am not sure that is safe nor do I really want to do that so how can I fix this.
Thank you!