Am 22.12.2010 um 21:44 schrieb Bernhard Roider: > But if you want to avoid the warning you can use an unsigned for scanf and do > a type cast to int
Yes, one can do that. The problem I have with it isn't the warning. The compiler warning was a hint to think about that piece of code. The only use of this function is to convert a string representation of a unicode char to char_type. To achieve that goal the use of scanf is a bad choice. I try to avoid scanf and its friends if possible. It's way to difficult to use it correctly. And it's overkill for the conversion of a hex string to a number. Stephan