Why does this not work?

israel via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 1 12:17:04 PST 2016


On Friday, 1 January 2016 at 14:00:41 UTC, TheDGuy wrote:
>     writeln("Which number should i guess?");
> 	string input = readln();
> 	int i = to!int(input);

You fell for the C# syntax like me...

According to Ahli. You have to use the old C way of doing it with 
readf.


More information about the Digitalmars-d-learn mailing list