By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!> I would not have expected Sscanf() to return 2.
else if ( Sscanf(L"foo", L" %lf %2s", &number, &unit) == 2 )
{
Printf(L"%lf %s\r\n", number, unit);
gives this:
0.0000000000000000 fo
> But why did the whole thing wind up returning 2?
That's unlike the RTF's swscanf() (isn't it?)
> ---Quote (Originally by vefatica)---
> That's unlike the RTF's swscanf() (isn't it?)
> ---End Quote---
>
> WAD -- Sscanf is different in dozens of ways from the RTL version.
>
> If I wanted RTL behavior, I would have used the RTL! Every difference in
> Sscanf is deliberate because I needed it for a particular use -- if you need
> RTL behavior, use the RTL (or write your own).
>
>
>
>
>
> Does that Sscanf support the %n?