Equivalent of scanf

Michael Koehmstedt mkoehmstedt at runner.csub.edu
Sat Jul 17 16:21:04 PDT 2010


Thanks for the informative reply.

I am getting a run-time error with to!int(str). Apparently to!() seems to only
support one-way converting other types to strings. That is part of the reason why
I was getting so confused in figuring out how to read in an integer value. But you
guys pointed me towards parse!() and that does work with string->int.

So there is no scanf equivalent, but there is also nothing similar to C++ cin with
the << operator?

And as for Phobos not being included much in TDPL, makes sense. I hope they
include a reference section on it in the 2nd edition after Phobos is stabilized.
That would make the book near perfect imo.


More information about the Digitalmars-d-learn mailing list