D
djake
How can I convert char in wchar_t?
And how can I convert wchar_t in char?
Thanks to anyone
And how can I convert wchar_t in char?
Thanks to anyone
How can I convert char in wchar_t?
And how can I convert wchar_t in char?
[...]Mike Wahler said:wchar_t w = 0;
char c = 'A';
w = c;
However, this has nothing to do with Unicode
(which is not topical here anyway).
c = (char)w;
.. however, data may be lost, as type 'char'
might not have the same range as 'wchar_t'.
Keith Thompson said:[...]Mike Wahler said:wchar_t w = 0;
char c = 'A';
w = c;
However, this has nothing to do with Unicode
(which is not topical here anyway).
c = (char)w;
.. however, data may be lost, as type 'char'
might not have the same range as 'wchar_t'.
The cast is superfluous. char and wchar_t are both integer types, so
an assignment includes an implicit conversion.
How can I convert char in wchar_t?
And how can I convert wchar_t in char?
Thanks to anyone
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.