scanf in MemoryStream
Chris Miller
chris at dprogramming.com
Sat May 20 11:21:18 PDT 2006
On Sat, 20 May 2006 07:21:43 -0400, sailormoontw
<sailormoontw_member at pathlink.com> wrote:
> 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);
> }
>
hahaha... not laughing at you, but it's a funny side affect:
There is no scanf in Stream or MemoryStream, but it is accessible because
std.c.stdio is imported inside Stream, making the stdin scanf available.
stdin scanf is waiting for you to type.
More information about the Digitalmars-d
mailing list