You can convert to and from, wide and narrow strings using mbstowcs() and wcstombs(). Here's one way to append an narrow string to a wide string:
Code:
void AppendAtoW(std::wstring &wstr, const char *astr)
{
const size_t buff_len = 128;
wchar_t buff[buff_len];
mbstowcs(buff, astr, buff_len);
buff[buff_len - 1] = 0; // in case astr is longer than buff_len
wstr += buff;
}//AppendAtoW
>> my_str = L"√";
This seems dangerous to me - because of two assumptions: 1) that your code editor saves your source code the "right" way; 2) that your compiler interprets the string literal as you expect. For (2), I'm not real familiar with what the standard has to say about this - but I'll start reading.
However, it sure is nice to see the same glyph in your source code that you intend to show in the control And it seems that mikeman118's editor and compiler are doing the "right" thing - based on the output: "√琠獥t쳌쳌쳌쳌".
gg