> Hi David,
>
[quoted text clipped - 10 lines]
>> %d will only work for unsigned int if the value is not bigger than the
>> largest allowed value of int. Otherwise, a negative value will be displayed.
George:
I meant:
For unsigned int, %d will only work if the value is not bigger than the
largest allowed value of int. Otherwise, a negative value will be
displayed. %u should be used with unsigned int.
%d is intended for use with int, and either positive or negative values
may be displayed.
Although not so well suited to localization, C++ streams handle this
issue much better, because they are overloaded for different types.

Signature
David Wilkinson
Visual C++ MVP
George - 25 Oct 2007 09:54 GMT
Thanks David,
I agree.
regards,
George
> > Hi David,
> >
[quoted text clipped - 24 lines]
> Although not so well suited to localization, C++ streams handle this
> issue much better, because they are overloaded for different types.