int input
Steven Schveighoffer
schveiguy at yahoo.com
Wed Sep 10 12:55:28 PDT 2008
"Rayne" wrote
> Steven Schveighoffer Wrote:
>
>> "Rayne" wrote
>> >I was wondering, since you can't cast readln, how would you get int
>> >input
>> >from the user? I know this is a newbish question, but yeah I'm not sure.
>>
>> use din from std.cstream:
>>
>> din.read(myint);
>> -or-
>> din.readf("%d", &myint);
>>
>> -Steve
>>
>>
> Awesome, thanks bro, I never thought to look in that namespace x_x.
yw :)
Yeah, I didn't think to look for it their either, I ended up doing a grep
for "readf" in order to find it the first time (which is in std.stream I
think), then I don't remember how I figured out to look for din :)
Of course, I don't generally use Phobos...
-Steve
More information about the Digitalmars-d
mailing list