On Fri, Mar 6, 2009 at 4:45 PM, Hansi
<hansipet@web.de> wrote:
Ovanes Markarian schrieb:
Hi!
strange code... You are trying to convert a 2 byte character string into a single byte unsigned character value? Std C++ does not definitely provide possibility for it. But if you know how to do the conversion, overload the operator >>, which accepsts the istream and unsigned char, smth. similar to:
The code is not so strange because for me the unsigned char is not a character but a number...
IMO this is strange, because you cut from the number a part, which might contain useful data and C++ prevents you from that. Why don't you convert it to wchar_t or unsigned short? L"..." produces multi byte char string.