sscanf problem,

Jarrett Billingsley kb3ctd2 at yahoo.com
Mon Jul 3 16:28:59 PDT 2006


"DMINATOR" <DMINATOR_member at pathlink.com> wrote in message 
news:e8c4qc$2pji$1 at digitaldaemon.com...

> Anyway all the code is parsed pretty well, except for a few places:
>
> 228/1/228 72/75/72 229/935/2298 <---- 2298, should be 229 !
> 75/937/75 232/6/232 658/12/6583  <---- 6583, should be 658 !
>
> So any ideas, what might be bugging here :) ?

Hmm.  I tried duplicating the problem, but it seemed to work just fine.

The only thing I can think of is that since sscanf is a C function, it 
expects strings to be null-terminated, and perhaps your string data might 
not be.  So try something like

sscanf(toStringz(text), "format string", &all, &the, &outputs);

See if that helps it. 





More information about the Digitalmars-d-learn mailing list