scanf in MemoryStream
Carlos Santander
csantander619 at gmail.com
Sat May 20 11:13:42 PDT 2006
sailormoontw escribió:
> The code is as follows, I assume this code would work in older version of D
> compiler, but in current version of D compiler, it halts. Is there anything
> changed in the scanf function of MemoryStream, and how should I fix to code?
>
> Thanks ^_^
>
>
>
> private import std.stream;
>
> void main()
> {
> MemoryStream ms = new MemoryStream("1.23 4.56 7.89 9.01 ");
> float a, b, c, d;
> ms.scanf("%f %f %f %f", &a, &b, &c, &d);
> }
>
>
Before the scanf, I think you need
ms.position = 0;
--
Carlos Santander Bernal
More information about the Digitalmars-d
mailing list